-
Notifications
You must be signed in to change notification settings - Fork 20
feat: upgrade storybook #880
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
base: v4
Are you sure you want to change the base?
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 |
---|---|---|
@@ -1,15 +1,14 @@ | ||
module.exports = { | ||
core: { | ||
builder: 'webpack5', | ||
}, | ||
stories: [ | ||
'../src/stories/Introduction.stories.mdx', | ||
'../src/**/*.stories.mdx', | ||
'../src/**/*.stories.@(js|jsx|ts|tsx)', | ||
'./*.stories.mdx', | ||
], | ||
addons: ['@storybook/addon-links', '@storybook/addon-essentials'], | ||
stories: ['../src/stories/Introduction.stories.mdx', '../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)', './*.stories.mdx'], | ||
addons: ['@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-mdx-gfm'], | ||
features: { | ||
storyStoreV7: true, | ||
storyStoreV7: true | ||
}, | ||
framework: { | ||
name: '@storybook/react-webpack5', | ||
options: {} | ||
}, | ||
}; | ||
docs: { | ||
autodocs: true | ||
} | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,7 +87,7 @@ export const ComboboxMultiSelect = ({ | |
}, [isSearchEmpty, options]); | ||
|
||
return ( | ||
<div style={{ maxWidth: '500px' }}> | ||
<div style={{ maxWidth: 500 }}> | ||
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. i need to use non-unit number else it will have problem rendering this storybook |
||
<Combobox.Label>Label</Combobox.Label> | ||
<Combobox | ||
{...args} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,9 +7,10 @@ import { Blue, Neutral } from '../../../utilities/colors'; | |
import { | ||
StyledSelect, | ||
StyledSelectTypography, | ||
StyledTag, | ||
TagsContainer, | ||
} from './ActivatorStyle'; | ||
import { Tag } from '../../../Tag'; | ||
import { space8 } from '../../../utilities/spacing/Spacing'; | ||
|
||
export interface ActivatorSelectProps | ||
extends React.ButtonHTMLAttributes<HTMLButtonElement> { | ||
|
@@ -76,13 +77,14 @@ export const ActivatorSelect = ({ | |
if (hasSelectedValues) { | ||
return ( | ||
<TagsContainer> | ||
<StyledTag | ||
<Tag | ||
style={{ width: 28, marginRight: space8 }} | ||
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. somehow it will have error rendering this page if we use styled component of so i have to not use styled component instead assign a style like the above to the tag 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. Hmmm can we investigate this more? I don't think we should update the implementations to cater storybook upgrade |
||
key={`option-${selectedValues[0]}`} | ||
onRemove={onRemoveTag({ option: selectedValues[0] })} | ||
textColor={Blue.S99} | ||
> | ||
{selectedLabels[0]} | ||
</StyledTag> | ||
</Tag> | ||
{selectedValues.length > 1 && ( | ||
<Typography | ||
variant="caption" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
import styled from 'styled-components'; | ||
|
||
import * as Breakpoints from '../../../utilities/breakpoints/Breakpoints'; | ||
import { TextInput } from '../../../TextInput'; | ||
import { Typography } from '../../../Typography'; | ||
import { borderRadius4 } from '../../../utilities/borderRadius'; | ||
import * as Breakpoints from '../../../utilities/breakpoints/Breakpoints'; | ||
import { Neutral, Red } from '../../../utilities/colors'; | ||
import { NotoSans } from '../../../utilities/fonts'; | ||
import { space8 } from '../../../utilities/spacing'; | ||
import { ActivatorSelectProps } from './ActivatorSelect'; | ||
import { TextInput } from '../../../TextInput'; | ||
import { Tag } from '../../../Tag'; | ||
import { Typography } from '../../../Typography'; | ||
|
||
export const StyledSelect = styled.button<ActivatorSelectProps>` | ||
display: flex; | ||
|
@@ -59,10 +57,10 @@ export const TagsContainer = styled.div` | |
align-items: center; | ||
`; | ||
|
||
export const StyledTag = styled(Tag)` | ||
height: 28px; | ||
margin-right: ${space8}; | ||
`; | ||
// export const StyledTag = styled(Tag)` | ||
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. keeping this because of the above 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. same comment as above |
||
// height: 28px; | ||
// margin-right: ${space8}; | ||
// `; | ||
|
||
export const StyledTextInput = styled(TextInput)` | ||
width: ${props => props.width}; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,8 @@ Interactive.args = { | |
label: 'Description', | ||
}; | ||
|
||
export const removeFloatingLabelIsTrue = Template.bind({}); | ||
removeFloatingLabelIsTrue.args = { | ||
export const RemoveFloatingLabelIsTrue = Template.bind({}); | ||
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. storybook plugin dictates that PascalCase should be used |
||
RemoveFloatingLabelIsTrue.args = { | ||
label: 'Remove Floating Label Is True', | ||
removeFloatingLabel: true, | ||
}; |
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.
storybook plugin dictates that PascalCase should be used