Skip to content
Snippets Groups Projects
Unverified Commit 01b4b80e authored by Nick Fitzpatrick's avatar Nick Fitzpatrick Committed by GitHub
Browse files

adding onlyText button variant (#27720)

* adding onlyText button variant

* PR feedback
parent 434e7868
No related merge requests found
......@@ -26,3 +26,9 @@ export const WithIcon = Template.bind({});
WithIcon.args = {
icon: "chevrondown",
};
export const OnlyText = Template.bind({});
OnlyText.args = {
onlyText: true,
children: "Click Me",
};
......@@ -4,6 +4,7 @@ import { alpha, color } from "metabase/lib/colors";
export interface ButtonRootProps {
purple?: boolean;
onlyText?: boolean;
}
export const ButtonRoot = styled.button<ButtonRootProps>`
......@@ -23,6 +24,18 @@ export const ButtonRoot = styled.button<ButtonRootProps>`
border-color: ${alpha("filter", 0.88)};
}
`}
${({ onlyText }) =>
onlyText &&
css`
border: none;
padding: 0;
color: ${color("brand")};
&:hover {
background-color: unset;
}
`}
`;
export interface ButtonContentProps {
......
......@@ -65,6 +65,7 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
borderless?: boolean;
onlyIcon?: boolean;
fullWidth?: boolean;
onlyText?: boolean;
}
const BaseButton = forwardRef(function BaseButton(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment