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(menu): add mt for menu item #221

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
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
1 change: 1 addition & 0 deletions react/src/theme/components/Menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const baseStyle = definePartsStyle((props) => {
boxShadow: $shadow.reference,
},
item: {
mt: '0.125rem',
Copy link
Collaborator

@karrui karrui Feb 13, 2023

Choose a reason for hiding this comment

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

can see from chromatic that the padding changed. But now that I think more about it, I think it's fine. We should move this into the size section of the theme, then get designers to sign off.

we should also use px in this case, since the border width when highlighting is not using rem

Copy link
Author

Choose a reason for hiding this comment

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

oki! can i just double check why we wanna put this into sizes rather than baseStyles? (no opinion, cos idk if got diff sizes from the figma + idk if the border will change b/w sizes)

Copy link
Collaborator

@karrui karrui Feb 14, 2023

Choose a reason for hiding this comment

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

future proofing, since sizes control the things that may change between sizes.
if border don't change then leave in base lor. but hor, some styles no border. so maybe put in variant safer

Copy link
Author

Choose a reason for hiding this comment

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

yea i think i'll put this in variant and define a MENU_ITEM_BORDER_STYLES to share b/w outline + clear (i could define a function also but cos we define clear in terms of a function so idk if it would be confusing)

bg: $bg.reference,
textStyle: 'body-1',
fontWeight: '400',
Expand Down