Skip to content

Commit

Permalink
feat: Add spinner data-test, update boutton
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume60240 committed Oct 30, 2023
1 parent 983b26b commit 91b0ef4
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/components/button/src/button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{ 'puik-button--fluid': fluid },
]"
:disabled="disabled"
:data-test="`button-${dataTest}`"
:data-test="`${dataTest}`"
@click="setSelected"
>
<puik-icon
Expand Down
2 changes: 1 addition & 1 deletion packages/components/button/stories/button.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default {
dataTest: {
control: 'text',
description:
'Set a data-test attribute to the button `button-${dataTest}` `left-icon-${dataTest}` `right-icon-${dataTest}`',
'Set a data-test attribute to the button `${dataTest}` `left-icon-${dataTest}` `right-icon-${dataTest}`',
},
},
args: {
Expand Down
5 changes: 5 additions & 0 deletions packages/components/spinner-loader/src/spinner-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ export const spinnerLoaderProps = buildProps({
required: false,
default: 'bottom',
},
dataTest: {
type: String,
required: false,
default: 'spinner-loader',
},
} as const)

export type SpinnerLoaderProps = ExtractPropTypes<typeof spinnerLoaderProps>
Expand Down
1 change: 1 addition & 0 deletions packages/components/spinner-loader/src/spinner-loader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
]"
aria-live="polite"
role="status"
:data-test="dataTest"
>
<div
class="puik-spinner-loader__spinner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ export default {
},
},
},
dataTest: {
control: 'text',
description: 'Set the data-test attribute on the spinner loader',
},
},
args: {
size: 'md',
Expand Down

0 comments on commit 91b0ef4

Please sign in to comment.