Skip to content

Add an option to convert attributes with hyphens to camel case #6501

Merged
artf merged 3 commits intodevfrom
data-gjs-hyphen-attributes
Apr 25, 2025
Merged

Add an option to convert attributes with hyphens to camel case #6501
artf merged 3 commits intodevfrom
data-gjs-hyphen-attributes

Conversation

@mohamedsalem401
Copy link
Contributor

  /**
   * Configures whether `data-gjs-*` attributes should be automatically converted from hyphenated to camelCase.
   *
   * When `true`:
   * - Hyphenated `data-gjs-*` attributes (e.g., `data-gjs-my-component`) are transformed into camelCase (`data-gjs-myComponent`).
   * - If `defaults` contains the camelCase version and not the original attribute, the camelCase will be used; otherwise, the original name is kept.
   *
   * @default false
   */
  convertDataGjsAttributesHyphens?: boolean;

Copy link
Member

@artf artf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@artf artf merged commit 12f376b into dev Apr 25, 2025
3 checks passed
@mohamedsalem401 mohamedsalem401 deleted the data-gjs-hyphen-attributes branch April 26, 2025 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants