2021-06-18 07:05:01 -04:00
|
|
|
import styled, { css } from "styled-components";
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
readonly contrast?: boolean;
|
|
|
|
readonly error?: boolean;
|
2021-06-18 10:46:30 -04:00
|
|
|
}
|
2021-06-18 07:05:01 -04:00
|
|
|
|
2021-06-18 10:18:10 -04:00
|
|
|
export default styled.button<Props>`
|
2021-06-18 10:57:08 -04:00
|
|
|
z-index: 1;
|
|
|
|
padding: 8px;
|
|
|
|
font-size: 16px;
|
|
|
|
text-align: center;
|
2021-06-24 12:06:16 -04:00
|
|
|
font-family: 'Open Sans', sans-serif;
|
2021-06-18 07:05:01 -04:00
|
|
|
|
2021-06-18 10:57:08 -04:00
|
|
|
transition: 0.2s ease opacity;
|
|
|
|
transition: 0.2s ease background-color;
|
2021-06-18 07:05:01 -04:00
|
|
|
|
2021-06-18 10:57:08 -04:00
|
|
|
background: var(--primary-background);
|
2021-06-18 07:05:01 -04:00
|
|
|
color: var(--foreground);
|
|
|
|
|
2021-06-18 10:57:08 -04:00
|
|
|
border-radius: 6px;
|
|
|
|
cursor: pointer;
|
2021-06-18 07:05:01 -04:00
|
|
|
border: none;
|
|
|
|
|
2021-06-18 10:57:08 -04:00
|
|
|
&:hover {
|
|
|
|
background: var(--secondary-header);
|
|
|
|
}
|
2021-06-18 07:05:01 -04:00
|
|
|
|
|
|
|
&:disabled {
|
|
|
|
background: var(--primary-background);
|
|
|
|
}
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
background: var(--secondary-background);
|
|
|
|
}
|
|
|
|
|
2021-06-18 10:57:08 -04:00
|
|
|
${(props) =>
|
|
|
|
props.contrast &&
|
|
|
|
css`
|
|
|
|
padding: 4px 8px;
|
2021-06-18 07:05:01 -04:00
|
|
|
background: var(--secondary-header);
|
|
|
|
|
2021-06-18 10:57:08 -04:00
|
|
|
&:hover {
|
|
|
|
background: var(--primary-header);
|
|
|
|
}
|
2021-06-18 07:05:01 -04:00
|
|
|
|
2021-06-18 10:57:08 -04:00
|
|
|
&:disabled {
|
|
|
|
background: var(--secondary-header);
|
|
|
|
}
|
2021-06-18 07:05:01 -04:00
|
|
|
|
2021-06-18 10:57:08 -04:00
|
|
|
&:active {
|
|
|
|
background: var(--secondary-background);
|
|
|
|
}
|
|
|
|
`}
|
2021-06-18 07:05:01 -04:00
|
|
|
|
2021-06-18 10:57:08 -04:00
|
|
|
${(props) =>
|
|
|
|
props.error &&
|
|
|
|
css`
|
|
|
|
color: white;
|
2021-06-18 07:05:01 -04:00
|
|
|
background: var(--error);
|
2021-06-18 10:57:08 -04:00
|
|
|
|
|
|
|
&:hover {
|
|
|
|
filter: brightness(1.2);
|
2021-07-03 17:17:53 -04:00
|
|
|
background: var(--error);
|
2021-06-18 10:57:08 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
&:disabled {
|
|
|
|
background: var(--error);
|
|
|
|
}
|
|
|
|
`}
|
2021-06-18 07:05:01 -04:00
|
|
|
`;
|