Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/867a-ensure-property-naming-text-button #944

Merged
merged 3 commits into from
Feb 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 13 additions & 29 deletions packages/ui-library/src/components/text-button/index.stories.ts
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I gave the first approval too fast. Please check the whole file again, if "onFocus" or other old events are still appearing somewhere and should be removed or renamed.

Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export default {
argTypes: {
//Appearance
variant: {
name: 'variant',
description: 'Select variant of the component.',
options: ActionVariants,
control: { type: 'select' },
Expand Down Expand Up @@ -76,7 +75,6 @@ export default {
},
//Content / Settings
label: {
name: 'label',
description: 'Enter string used as label text.',
control: {
type: 'text',
Expand All @@ -86,7 +84,6 @@ export default {
},
},
hasIcon: {
name: 'hasIcon',
description: 'Choose if component has an icon.',
defaultValue: true,
control: {
Expand All @@ -97,7 +94,6 @@ export default {
},
},
icon: {
name: 'icon',
description: 'Select an icon which is displayed next to the label.',
options: [undefined, ...PureIconKeys],
control: { type: 'select' },
Expand All @@ -107,7 +103,6 @@ export default {
},
},
iconPosition: {
name: 'iconPosition',
description: 'Choose the position of the icon next to the label.',
options: IconPositionVariant,
control: { type: 'select' },
Expand All @@ -118,7 +113,6 @@ export default {
},
//States
disabled: {
name: 'disabled',
description:
'Choose if component is disabled. Prevents the user to select or change the value of this component.',
defaultValue: false,
Expand All @@ -141,36 +135,27 @@ export default {
category: 'Technical Attributes',
},
},
//Accessibility
arialabel: {
name: 'ariaLabel',
description:
'Provides additional information about the elements purpose and functionality to assistive technologies, such as screen readers.',
table: {
disable: true,
},
},
// Events
onClick: {
name: 'onClick',
blrClick: {
name: 'blrClick',
description: 'Fires when the component is clicked.',
action: 'onClick',
action: 'blrClick',
table: {
category: 'Events',
},
},
onFocus: {
name: 'onFocus',
blrFocus: {
name: 'blrFocus',
description: 'Fires when the component is focused.',
action: 'onFocus',
action: 'blrFocus',
table: {
disable: 'true',
category: 'Events',
},
},
onBlur: {
name: 'onBlur',
blrBlur: {
name: 'blrBlur',
description: 'Fires when the component lost focus.',
action: 'onBlur',
action: 'blrBlur',
table: {
category: 'Events',
},
Expand Down Expand Up @@ -213,7 +198,6 @@ BlrTextButton.args = defaultParams;
//disabledArgTypesTable to deactivate the controls-Panel for a story in storybook
const argTypesToDisable = [
'theme',
'arialabel',
'variant',
'sizeVariant',
'label',
Expand All @@ -224,9 +208,9 @@ const argTypesToDisable = [
'disabled',
'textButtonId',
'buttonDisplay',
'onClick',
'onBlur',
'onFocus',
'blrClick',
'blrBlur',
'blrFocus',
];
const generateDisabledArgTypes = (argTypes: string[]) => {
const disabledArgTypes = {};
Expand Down
Loading