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

[UIE-198] NameModal storybook #4925

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

[UIE-198] NameModal storybook #4925

wants to merge 1 commit into from

Conversation

mlilynolting
Copy link
Contributor

Jira Ticket: https://broadworkbench.atlassian.net/browse/UIE-198

A little Storybook for the NameModal component.

@mlilynolting mlilynolting requested review from cahrens and a team July 1, 2024 21:16
@cahrens
Copy link
Member

cahrens commented Jul 8, 2024

@mlilynolting you have build errors

onDismiss: () => {},
thing: 'Dog',
value: 'Lassie',
validator: (value) => (value === 'Fido' ? false : 'I only like dogs named Fido'),
Copy link
Member

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".

Copy link
Contributor Author

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' });
Copy link
Member

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.

Copy link
Contributor Author

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>
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants