-
Notifications
You must be signed in to change notification settings - Fork 111
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 harmony docs sidebar-item #6690
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,9 +5,6 @@ | |
import { jsx } from '@emotion/react' | ||
import { useTheme } from '@storybook/theming' | ||
|
||
import { Box } from '../../components/layout/Box' | ||
import { Flex } from '../../components/layout/Flex' | ||
|
||
type SidebarItemProps = { | ||
name: string | ||
status: string | ||
|
@@ -22,19 +19,25 @@ export const SidebarItem = (props: SidebarItemProps) => { | |
: theme.barSelectedColor | ||
|
||
return ( | ||
<Flex justifyContent='space-between' w='100%'> | ||
<Box as='div'>{name}</Box> | ||
<Flex | ||
justifyContent='center' | ||
alignItems='center' | ||
as='div' | ||
ph='s' | ||
borderRadius='s' | ||
border='default' | ||
css={{ height: '18px', borderColor: statusColor, color: statusColor }} | ||
<div | ||
css={{ display: 'flex', justifyContent: 'space-between', width: '100%' }} | ||
> | ||
<span>{name}</span> | ||
<div | ||
Comment on lines
+22
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why does removing the Flex and Box fix this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. tried to explain in description, but we dont have access to the theme in the manager context, which includes the side-bar There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah i didnt read it, just went to the code lol |
||
css={{ | ||
display: 'flex', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
height: 18, | ||
paddingLeft: 8, | ||
paddingRight: 8, | ||
borderRadius: 4, | ||
border: `1px solid ${statusColor}`, | ||
color: statusColor | ||
}} | ||
> | ||
{status} | ||
</Flex> | ||
</Flex> | ||
</div> | ||
</div> | ||
) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the Box was a div before, not a span. Not sure if that matters here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah i checked, seemed to not matter