-
Notifications
You must be signed in to change notification settings - Fork 61
/
Paper.styles.ts
37 lines (35 loc) · 1.04 KB
/
Paper.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
import { createStyles } from '$lib/styles';
import type { SvelteUIShadow, SvelteUINumberSize } from '$lib/styles';
export interface PaperStyleParams {
shadow: SvelteUIShadow;
radius: SvelteUINumberSize;
withBorder: boolean;
padding: SvelteUINumberSize;
}
export default createStyles((theme, { radius, shadow, withBorder, padding }: PaperStyleParams) => {
return {
root: {
darkMode: {
backgroundColor: theme.fn.themeColor('dark', 7),
color: theme.fn.themeColor('dark')
},
padding: theme.fn.size({ size: padding, sizes: theme.space }),
outline: 0,
display: 'block',
textDecoration: 'none',
color: theme.colors.black.value,
backgroundColor: theme.colors.white.value,
boxSizing: 'border-box',
borderRadius: `$${radius}`,
WebkitTapHighlightColor: 'transparent',
boxShadow: theme.shadows[shadow].value || shadow || 'none',
border: undefined
},
withBorder: {
darkMode: {
border: `1px solid ${theme.fn.themeColor('dark', 4)}`
},
border: `1px solid ${theme.fn.themeColor('gray', 3)}`
}
};
});