Skip to content

Conversation

@nnhilys
Copy link
Collaborator

@nnhilys nnhilys commented Jul 6, 2021

No description provided.

@vercel
Copy link

vercel bot commented Jul 6, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/makeinvietnam/moai-docs/BfHnPWyngCwkBRKbtoJeDmfWeU6J
✅ Preview: https://moai-docs-git-fork-ngocnhi123-main-makeinvietnam.vercel.app

@nnhilys nnhilys changed the title Fix(button): add danger prop Feat(button): add danger prop Jul 6, 2021
@nnhilys nnhilys changed the title Feat(button): add danger prop Feat(button): use ButtonColor (highlight and danger) Jul 6, 2021
const getColor = (props: ButtonProps) => {
if (props.highlight !== undefined && props.color !== undefined)
throw Error(
"highlight and color cannot be defined at the same time. Use color only"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be put attribute name in the backtick? I think it will be easier to scan.

image

});

export const Danger = (): JSX.Element => (
<Button color={Button.color.danger} children="Danger" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have an outline style? And some description if it could be.

Let button style chooses the color
@thien-do thien-do merged commit 3c68e0a into thien-do:main Jul 31, 2021
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.

3 participants