Skip to content

Commit

Permalink
refactor(checkbox): remove /*HTML*/ within story template strings (#…
Browse files Browse the repository at this point in the history
…323)

keep the /* HTML */ comment before the template string
this somehow enables the syntax html highlighting in vsocde
  • Loading branch information
hirenchauhan2 committed Jul 4, 2024
1 parent 9ac6e78 commit f0c0218
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions libs/ui/checkbox/checkbox.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ type Story = StoryObj<HlmCheckboxComponent>;

export const Default: Story = {
render: () => ({
template: `
/* HTML */
template: /* HTML */ `
<label id='checkbox-label' class='' hlmLabel> Test Checkbox
<hlm-checkbox id='testCheckbox' aria-checked='mixed' aria-label='test checkbox'/>
</label>
Expand All @@ -59,8 +58,7 @@ export const Default: Story = {

export const InsideLabel: Story = {
render: () => ({
template: `
/* HTML */
template: /* HTML */ `
<label id='checkbox-label' class='flex items-center' hlmLabel> Test Checkbox
<hlm-checkbox class='ml-2' id='testCheckbox'/>
</label>
Expand All @@ -70,8 +68,7 @@ export const InsideLabel: Story = {

export const LabeledWithAriaLabeledBy: Story = {
render: () => ({
template: `
/* HTML */
template: /* HTML */ `
<div id='checkbox-label' class='flex items-center'>
<label id='testCheckbox' for='testCheckboxAria' hlmLabel> Test Checkbox </label>
<hlm-checkbox class='ml-2' id='testCheckboxAria' aria-labelledby='testCheckbox'/>
Expand All @@ -82,8 +79,7 @@ export const LabeledWithAriaLabeledBy: Story = {

export const disabled: Story = {
render: () => ({
template: `
/* HTML */
template: /* HTML */ `
<div class='flex items-center'>
<label id='checkbox-label' for='testCheckboxDis1' hlmLabel> Test Checkbox </label>
<hlm-checkbox disabled class='ml-2' id='testCheckboxDis1' aria-labelledby='testCheckbox'/>
Expand All @@ -104,17 +100,15 @@ export const disabled: Story = {

export const disabledWithForms: Story = {
render: () => ({
template: `
/* HTML */
template: /* HTML */ `
<hlm-checkbox-component-tester />
`,
}),
};

export const indeterminate: Story = {
render: () => ({
template: `
/* HTML */
template: /* HTML */ `
<div id='checkbox-label' class='flex items-center'>
<label id='testCheckbox' for='testCheckboxIndeterminate' hlmLabel> Test Checkbox </label>
<hlm-checkbox checked="indeterminate" class='ml-2' id='testCheckboxIndeterminate' aria-labelledby='testCheckbox'/>
Expand Down

0 comments on commit f0c0218

Please sign in to comment.