feat: add status style preset in Button

This commit is contained in:
p-sw 2024-05-28 21:22:47 +09:00
parent c9d8b76fa2
commit b53581f750
2 changed files with 21 additions and 15 deletions

View File

@ -79,6 +79,24 @@ const [buttonVariants, resolveVariants] = vcn({
decoration: "link", decoration: "link",
size: "md", size: "md",
}, },
success: {
border: "success",
background: "success",
decoration: "none",
size: "md",
},
warning: {
border: "warning",
background: "warning",
decoration: "none",
size: "md",
},
danger: {
border: "danger",
background: "danger",
decoration: "none",
size: "md",
},
}, },
}); });

View File

@ -16,27 +16,15 @@ export const Link = () => {
}; };
export const Success = () => { export const Success = () => {
return ( return <Button preset="success">Success Button</Button>;
<Button preset="default" background="success" border="success">
Success Button
</Button>
);
}; };
export const Warning = () => { export const Warning = () => {
return ( return <Button preset="warning">Warning Button</Button>;
<Button preset="default" background="warning" border="warning">
Warning Button
</Button>
);
}; };
export const Danger = () => { export const Danger = () => {
return ( return <Button preset="danger">Danger Button</Button>;
<Button preset="default" background="danger" border="danger">
Danger Button
</Button>
);
}; };
export const AsChild = () => { export const AsChild = () => {