|
1 | 1 | import { css } from '@emotion/react' |
2 | | -import { colors } from '../_utils/colors' |
3 | | -import { fontPrimary } from '../_utils/commonStyles' |
| 2 | +import { ThemeType, get } from '../_theme' |
4 | 3 |
|
5 | | -export const dropzoneContainer = css` |
| 4 | +export const dropzoneContainer = (theme: ThemeType) => css` |
6 | 5 | padding: 32px; |
7 | | - border: 1px dashed ${colors.neutral300}; |
| 6 | + border: 1px dashed ${get(theme, `Dropzone.container.borderColor`)}; |
8 | 7 | border-radius: 8px; |
9 | 8 | ` |
10 | 9 |
|
11 | | -export const placeholder = css` |
| 10 | +export const placeholder = (theme: ThemeType) => css` |
12 | 11 | display: flex; |
13 | 12 | flex-direction: column; |
14 | 13 | align-items: center; |
15 | | - color: ${colors.neutral500}; |
| 14 | + color: ${get(theme, `Dropzone.placeholder.color`)}; |
16 | 15 | ` |
17 | 16 |
|
18 | | -export const placeholderText = css` |
19 | | - font-family: ${fontPrimary}; |
20 | | - color: ${colors.neutral800}; |
21 | | - font-style: normal; |
| 17 | +export const placeholderText = (theme: ThemeType) => css` |
| 18 | + color: ${get(theme, `Dropzone.placeholder.text.color`)}; |
22 | 19 | font-weight: 400; |
23 | 20 | font-size: 14px; |
24 | 21 | line-height: 22px; |
25 | 22 | margin: 12px 0 0 0; |
26 | 23 |
|
27 | 24 | span { |
28 | | - color: ${colors.primary}; |
| 25 | + color: ${get(theme, `Dropzone.placeholder.highlight.color`)}; |
29 | 26 | text-decoration: underline; |
30 | 27 | cursor: pointer; |
31 | 28 | } |
32 | 29 | ` |
33 | 30 |
|
34 | | -export const placeholderDescription = css` |
35 | | - font-family: ${fontPrimary}; |
36 | | - color: ${colors.neutral500}; |
| 31 | +export const placeholderDescription = (theme: ThemeType) => css` |
| 32 | + color: ${get(theme, `Dropzone.placeholder.description.color`)}; |
37 | 33 | font-weight: 400; |
38 | 34 | font-size: 12px; |
39 | 35 | line-height: 18px; |
@@ -65,23 +61,20 @@ export const fileLine = css` |
65 | 61 | padding-left: 12px; |
66 | 62 | ` |
67 | 63 |
|
68 | | -export const fileName = css` |
69 | | - font-family: ${fontPrimary}; |
70 | | - color: ${colors.neutral800}; |
71 | | - font-style: normal; |
| 64 | +export const fileName = (theme: ThemeType) => css` |
| 65 | + color: ${get(theme, `Dropzone.file.color`)}; |
72 | 66 | font-weight: 400; |
73 | 67 | font-size: 14px; |
74 | 68 | line-height: 22px; |
75 | 69 | ` |
76 | 70 |
|
77 | | -export const closeIcon = css` |
| 71 | +export const closeIcon = (theme: ThemeType) => css` |
78 | 72 | cursor: pointer; |
79 | | - color: ${colors.neutral500}; |
| 73 | + color: ${get(theme, `Dropzone.file.close.color`)}; |
80 | 74 | ` |
81 | 75 |
|
82 | | -export const fileSize = css` |
83 | | - font-family: ${fontPrimary}; |
84 | | - color: ${colors.neutral500}; |
| 76 | +export const fileSize = (theme: ThemeType) => css` |
| 77 | + color: ${get(theme, `Dropzone.file.size.color`)}; |
85 | 78 | font-weight: 400; |
86 | 79 | font-size: 12px; |
87 | 80 | line-height: 18px; |
|
0 commit comments