-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
styles.ts
40 lines (34 loc) 路 826 Bytes
/
styles.ts
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
35
36
37
38
39
40
import styled, { css } from 'styled-components';
import { centerIcon, transparency } from 'wexond-ui';
import { MENU_WIDTH } from '~/renderer/constants';
export const StyledButton = styled.div`
width: ${MENU_WIDTH}px;
height: ${MENU_WIDTH}px;
cursor: pointer;
position: relative;
${({ disabled }: { disabled: boolean }) => css`
pointer-events: ${disabled ? 'none' : 'auto'};
`}
`;
export const Icon = styled.div`
width: ${MENU_WIDTH}px;
height: ${MENU_WIDTH}px;
&:hover {
opacity: 1;
}
${({
icon,
selected,
size,
disabled,
}: {
icon: any;
selected: boolean;
size: number;
disabled: boolean;
}) => css`
background-image: url(${icon});
opacity: ${disabled ? transparency.icons.disabled : (selected ? 1 : transparency.icons.inactive)};
${centerIcon(size)};
`}
`;