mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-26 13:45:30 +03:00
feat(Buttons): add link to ButtonSecondary
This commit is contained in:
parent
7248908bc1
commit
440802987f
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user