forked from skiff-org/skiff-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.ts
54 lines (45 loc) · 1.13 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import { css } from 'styled-components';
import { ThemeMode } from './types';
import { getThemedColor } from './utils/colorUtils';
/** Keeps scrollbar displayed */
export const DISPLAY_SCROLLBAR_CSS = css`
/* Width */
::-webkit-scrollbar {
width: 10px;
}
/* Handle */
::-webkit-scrollbar-thumb {
border-radius: 10px;
border: 2px solid transparent;
box-shadow: inset 0 0 0 10px;
color: ${({ forceTheme }: { forceTheme?: ThemeMode }) => getThemedColor('var(--bg-cell-hover)', forceTheme)};
}
`;
/** Keeps scrollbar hidden */
export const REMOVE_SCROLLBAR_CSS = css`
/* Width */
::-webkit-scrollbar {
width: 0;
}
/* Track */
::-webkit-scrollbar-track {
background: none;
}
/* Handle */
::-webkit-scrollbar-thumb {
background: none;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: none;
}
-ms-overflow-style: none; /* IE 11 */
scrollbar-width: none; /* Firefox 64 */
`;
/** Component will have the same width and height */
export const SQUARE_CSS = css`
${({ $size }: { $size: number }) => `
width: ${$size}px;
height: ${$size}px;
`}
`;