-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathStyledErrorButton.tsx
34 lines (33 loc) · 1.37 KB
/
StyledErrorButton.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import styled from 'styled-components';
export const StyledErrorButton = styled.button<{
$activeColour: string;
$inactiveColour: string;
fontFamily: string;
fontSize: number;
fontWeight: string;
fontStyle: string;
color: string;
$enabled: boolean;
$margin?: string;
}>`
align-self: flex-end;
background-color: ${({$inactiveColour, $activeColour, $enabled }) => ($enabled ? $activeColour : $inactiveColour)};
border: 2px solid ${({$enabled, $activeColour, $inactiveColour}) => ($enabled ? $activeColour : $inactiveColour)};
font-family: Arial;
font-size: 14px;
min-height: 30px;
font-family: ${({ fontFamily }) => fontFamily};
font-size: ${({ fontSize }) => fontSize}px;
font-weight: ${({ fontWeight }) => fontWeight};
font-style: ${({ fontStyle }) => fontStyle};
color: ${({ color }) => color};
&:hover {
background-color: ${({$enabled, $activeColour, $inactiveColour}) => ($enabled ? $activeColour : $inactiveColour)};
color: ${({ color }) => color};
border: 2px solid ${({$enabled, $inactiveColour, $activeColour}) => ($enabled ? $activeColour : $inactiveColour)};
outline: ${({$enabled, $activeColour}) => ($enabled ? $activeColour : 'transparent')} solid 2px;
}
&:focus {
outline: ${(props) => (props.$enabled ? props.$activeColour : 'transparent')} solid 2px;
}
`;