feat(Buttons): add link to ButtonSecondary

This commit is contained in:
Aminejv 2021-11-04 16:50:21 +01:00
parent 7248908bc1
commit 440802987f

View File

@ -112,6 +112,7 @@ const STYLES_BUTTON_SECONDARY = css`
color: ${Constants.system.black};
background-color: ${Constants.system.grayLight5};
box-shadow: 0 0 0 1px ${Constants.semantic.bgLight} inset;
text-decoration: none;
:hover {
background-color: ${Constants.system.grayLight4};
@ -156,6 +157,16 @@ export const ButtonSecondary = (props) => {
);
}
if (props.type === "link") {
return (
<a
css={props.transparent ? STYLES_BUTTON_SECONDARY_TRANSPARENT : STYLES_BUTTON_SECONDARY}
style={{ width: props.full ? "100%" : "auto", ...props.style }}
{...props}
/>
);
}
return (
<button
css={props.transparent ? STYLES_BUTTON_SECONDARY_TRANSPARENT : STYLES_BUTTON_SECONDARY}