forked from TanStack/query
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyledComponents.ts
110 lines (102 loc) · 2.44 KB
/
styledComponents.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
import { styled } from './utils'
export const Panel = styled(
'div',
(_props, theme) => ({
fontSize: 'clamp(12px, 1.5vw, 14px)',
fontFamily: `sans-serif`,
display: 'flex',
backgroundColor: theme.background,
color: theme.foreground,
}),
{
'(max-width: 700px)': {
flexDirection: 'column',
},
'(max-width: 600px)': {
fontSize: '.9em',
// flexDirection: 'column',
},
},
)
export const ActiveQueryPanel = styled(
'div',
() => ({
flex: '1 1 500px',
display: 'flex',
flexDirection: 'column',
overflow: 'auto',
height: '100%',
}),
{
'(max-width: 700px)': (_props, theme) => ({
borderTop: `2px solid ${theme.gray}`,
}),
},
)
export const Button = styled('button', (props, theme) => ({
appearance: 'none',
fontSize: '.9em',
fontWeight: 'bold',
background: theme.gray,
border: '0',
borderRadius: '.3em',
color: 'white',
padding: '.5em',
opacity: props.disabled ? '.5' : undefined,
cursor: 'pointer',
}))
export const QueryKeys = styled('span', {
display: 'flex',
flexWrap: 'wrap',
gap: '0.5em',
fontSize: '0.9em',
})
export const QueryKey = styled('span', {
display: 'inline-flex',
alignItems: 'center',
padding: '.2em .4em',
fontWeight: 'bold',
textShadow: '0 0 10px black',
borderRadius: '.2em',
})
export const Code = styled('code', {
fontSize: '.9em',
color: 'inherit',
background: 'inherit',
})
export const Input = styled('input', (_props, theme) => ({
backgroundColor: theme.inputBackgroundColor,
border: 0,
borderRadius: '.2em',
color: theme.inputTextColor,
fontSize: '.9em',
lineHeight: `1.3`,
padding: '.3em .4em',
}))
export const Select = styled(
'select',
(_props, theme) => ({
display: `inline-block`,
fontSize: `.9em`,
fontFamily: `sans-serif`,
fontWeight: 'normal',
lineHeight: `1.3`,
padding: `.3em 1.5em .3em .5em`,
height: 'auto',
border: 0,
borderRadius: `.2em`,
appearance: `none`,
WebkitAppearance: 'none',
backgroundColor: theme.inputBackgroundColor,
backgroundImage: `url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23444444'><polygon points='0,25 100,25 50,75'/></svg>")`,
backgroundRepeat: `no-repeat`,
backgroundPosition: `right .55em center`,
backgroundSize: `.65em auto, 100%`,
color: theme.inputTextColor,
}),
{
'(max-width: 500px)': {
display: 'none',
},
},
)