Skip to content

Commit

Permalink
feat(web): disable style for secondarybutton
Browse files Browse the repository at this point in the history
  • Loading branch information
kemuru committed Jan 25, 2024
1 parent d4d2d2c commit bd524db
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/examples/buttons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const Buttons = () => (
<Button small text="Get help" Icon={Telegram} />
<Button disabled isLoading text="Hello" />
<Button variant="secondary" text="Hello" />
<Button variant="secondary" isLoading disabled text="Hello" />
<Button variant="tertiary" small text="Hello" />
</>
);
Expand Down
29 changes: 23 additions & 6 deletions src/lib/button/secondary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,41 @@ import styled from "styled-components";
import BaseButton from "./base";

const SecondaryButton = styled(BaseButton)`
background: ${(props) => props.theme.klerosUIComponentsWhiteBackground};
background: ${(props) =>
props.disabled
? props.theme.klerosUIComponentsLightGrey
: props.theme.klerosUIComponentsWhiteBackground};
border: ${(props) =>
"1px solid " + props.theme.klerosUIComponentsPrimaryBlue};
props.disabled
? `1px solid ${props.theme.klerosUIComponentsStroke}`
: `1px solid ${props.theme.klerosUIComponentsPrimaryBlue}`};
.button-text {
color: ${(props) => props.theme.klerosUIComponentsPrimaryBlue};
color: ${(props) =>
props.disabled
? props.theme.klerosUIComponentsStroke
: props.theme.klerosUIComponentsPrimaryBlue};
}
.button-svg {
fill: ${(props) => props.theme.klerosUIComponentsPrimaryBlue};
fill: ${(props) =>
props.disabled
? props.theme.klerosUIComponentsStroke
: props.theme.klerosUIComponentsPrimaryBlue};
}
.button-loading {
fill: ${(props) => props.theme.klerosUIComponentsPrimaryBlue};
fill: ${(props) =>
props.disabled
? props.theme.klerosUIComponentsStroke
: props.theme.klerosUIComponentsPrimaryBlue};
}
:hover {
background: ${(props) => props.theme.klerosUIComponentsMediumBlue};
background: ${(props) =>
props.disabled
? props.theme.klerosUIComponentsLightGrey
: props.theme.klerosUIComponentsMediumBlue};
}
`;

Expand Down

0 comments on commit bd524db

Please sign in to comment.