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: Settings - Contact method menu item right arrow icon is not vertically centre align #17906

Merged
merged 2 commits into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
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
95 changes: 95 additions & 0 deletions src/stories/MenuItem.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,111 @@ const Template = args => <MenuItem {...args} />;
// See: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
const Default = Template.bind({});
Default.args = {
title: 'Alberta Bobbeth Charleson',
icon: Chase,
iconHeight: variables.iconSizeExtraLarge,
iconWidth: variables.iconSizeExtraLarge,
};

const Description = Template.bind({});
Description.args = {
title: 'Alberta Bobbeth Charleson',
description: 'Account ending in 1111',
icon: Chase,
iconHeight: variables.iconSizeExtraLarge,
iconWidth: variables.iconSizeExtraLarge,
};

const RightIcon = Template.bind({});
RightIcon.args = {
title: 'Alberta Bobbeth Charleson',
icon: Chase,
iconHeight: variables.iconSizeExtraLarge,
iconWidth: variables.iconSizeExtraLarge,
shouldShowRightIcon: true,
};

const RightIconAndDescription = Template.bind({});
RightIconAndDescription.args = {
title: 'Alberta Bobbeth Charleson',
description: 'Account ending in 1111',
icon: Chase,
iconHeight: variables.iconSizeExtraLarge,
iconWidth: variables.iconSizeExtraLarge,
shouldShowRightIcon: true,
};

const Selected = Template.bind({});
Selected.args = {
title: 'Alberta Bobbeth Charleson',
description: 'Account ending in 1111',
icon: Chase,
iconHeight: variables.iconSizeExtraLarge,
iconWidth: variables.iconSizeExtraLarge,
shouldShowSelectedState: true,
isSelected: true,
};

const BadgeText = Template.bind({});
BadgeText.args = {
title: 'Alberta Bobbeth Charleson',
icon: Chase,
iconHeight: variables.iconSizeExtraLarge,
iconWidth: variables.iconSizeExtraLarge,
shouldShowRightIcon: true,
badgeText: '$0.00',
};

const Focused = Template.bind({});
Focused.args = {
title: 'Alberta Bobbeth Charleson',
icon: Chase,
iconHeight: variables.iconSizeExtraLarge,
iconWidth: variables.iconSizeExtraLarge,
shouldShowRightIcon: true,
focused: true,
};

const Disabled = Template.bind({});
Disabled.args = {
title: 'Alberta Bobbeth Charleson',
icon: Chase,
iconHeight: variables.iconSizeExtraLarge,
iconWidth: variables.iconSizeExtraLarge,
shouldShowRightIcon: true,
disabled: true,
};

const BrickRoadIndicatorSuccess = Template.bind({});
BrickRoadIndicatorSuccess.args = {
title: 'Alberta Bobbeth Charleson',
icon: Chase,
iconHeight: variables.iconSizeExtraLarge,
iconWidth: variables.iconSizeExtraLarge,
shouldShowRightIcon: true,
brickRoadIndicator: 'success',
};

const BrickRoadIndicatorFailure = Template.bind({});
BrickRoadIndicatorFailure.args = {
title: 'Alberta Bobbeth Charleson',
icon: Chase,
iconHeight: variables.iconSizeExtraLarge,
iconWidth: variables.iconSizeExtraLarge,
shouldShowRightIcon: true,
brickRoadIndicator: 'error',
};

export default story;
export {
Default,
Description,
RightIcon,
RightIconAndDescription,
Selected,
BadgeText,
Focused,
Disabled,
BrickRoadIndicatorSuccess,
BrickRoadIndicatorFailure,
};
1 change: 0 additions & 1 deletion src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,6 @@ const styles = {

popoverMenuIcon: {
width: variables.componentSizeNormal,
height: variables.componentSizeNormal,
justifyContent: 'center',
alignItems: 'center',
},
Expand Down