-
Notifications
You must be signed in to change notification settings - Fork 21
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
[UIE-198] NameModal storybook #4925
base: dev
Are you sure you want to change the base?
Conversation
@mlilynolting you have build errors |
onDismiss: () => {}, | ||
thing: 'Dog', | ||
value: 'Lassie', | ||
validator: (value) => (value === 'Fido' ? false : 'I only like dogs named Fido'), |
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.
I would suggest a case-insensitive match. I had trouble figuring out how to get rid of the error message, as I tried "fido" or "FIDO".
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.
Thanks; I'll make it /i
render: (args) => { | ||
const StoryWrapper = (): React.ReactNode => { | ||
const [isModalOpen, modalOpen] = useState(false); | ||
const [value, setValue] = useState({ name: 'Laddie' }); |
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.
You used "Lassie" as the value for the modal.
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 this was intended to be a different value but it doesn't really matter
}; | ||
return ( | ||
<div> | ||
<div>{`My dog's name is ${value.name}.`}</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.
Could you put a little spacing between the div and the button?
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.
yep!
Jira Ticket: https://broadworkbench.atlassian.net/browse/UIE-198
A little Storybook for the NameModal component.