Skip to content

Commit

Permalink
docs: [select-refacto] - option section: listing data-test attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgoud committed Dec 17, 2024
1 parent 92dddfb commit 426d43a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
4 changes: 2 additions & 2 deletions packages/components/select/stories/option.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default {
summary: '@open'
},
type: {
summary: 'Event',
summary: 'Event (see details)',
detail: `
'open': [state: boolean]
`
Expand All @@ -90,7 +90,7 @@ export default {
summary: '@select'
},
type: {
summary: 'Event',
summary: 'Event (see details)',
detail: `
'select': [payload: { label: string, value: string | number }]
`
Expand Down
29 changes: 19 additions & 10 deletions packages/components/select/stories/select.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,18 @@ export default {
summary: 'none'
},
type: {
summary: 'string'
summary: 'string (see details)',
detail: `
select-label-{dataTest}
select-multiple-options-tags-{dataTest}
select-tag-{index + 1}-{dataTest} (for each tag)
select-multiple-input-{dataTest}
select-single-{dataTest}
select-dropdown-{dataTest}
select-search-input-{dataTest}
select-group-options-{dataTest} select-option-{index + 1}-{dataTest}
select-error-{dataTest}
`
},
category: 'Common'
}
Expand All @@ -299,7 +310,7 @@ export default {
summary: '@open'
},
type: {
summary: 'Event',
summary: 'Event (see details)',
detail: `
'open': [state: boolean]
`
Expand All @@ -314,7 +325,7 @@ export default {
summary: '@update:model-value'
},
type: {
summary: 'Event',
summary: 'Event (see details)',
detail: `
'update:modelValue': [selectedOptions: any]
`
Expand All @@ -329,7 +340,7 @@ export default {
summary: '@search'
},
type: {
summary: 'Event',
summary: 'Event (see details)',
detail: `
'search': [searchQuery: string, filteredOptions: any ]
`
Expand Down Expand Up @@ -745,7 +756,7 @@ export const openEvent: StoryObj = {
name="select-open-event-name"
label="Select an option"
:options="options"
:open="openRef"
:open="openState"
@open="(state) => openState = state"
/>
</div>
Expand Down Expand Up @@ -775,7 +786,7 @@ export const openEvent: StoryObj = {
name="select-open-event-name"
label="Select an option"
:options="options"
:open="openRef"
:open="openState"
@open="(state) => openState = state"
/>
`,
Expand Down Expand Up @@ -804,7 +815,7 @@ export const updateModelValueEvent: StoryObj = {
template: `
<div class="min-h-[250px] flex flex-col space-y-2">
<div>
<puik-badge :variant="info">
<puik-badge variant="info">
value : {{ newValue }}
</puik-badge>
</div>
Expand All @@ -815,7 +826,6 @@ export const updateModelValueEvent: StoryObj = {
name="select-update-model-value--name"
label="Select an option"
:options="options"
:open="openRef"
@update:model-value="(payload) => newValue = payload"
/>
</div>
Expand All @@ -834,7 +844,7 @@ export const updateModelValueEvent: StoryObj = {
// const selectedOption = ref();
// const newValue = ref();
<puik-badge :variant="info">
<puik-badge variant="info">
value : {{ newValue }}
</puik-badge>
Expand All @@ -845,7 +855,6 @@ export const updateModelValueEvent: StoryObj = {
name="select-update-model-value--name"
label="Select an option"
:options="options"
:open="openRef"
@update:model-value="(payload) => newValue = payload"
/>
`,
Expand Down

0 comments on commit 426d43a

Please sign in to comment.