Skip to content
This repository was archived by the owner on Jan 2, 2021. It is now read-only.

Commit 25d396d

Browse files
committed
fix: adaptive text size
1 parent cc6d808 commit 25d396d

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ export const ReactQueryDevtoolsPanel = React.forwardRef(
288288
opacity: 0.3,
289289
}}
290290
>
291-
React Query Devtools <small>v{pkg.version}</small>
291+
React Query Devtools
292292
</div>
293293
<div
294294
style={{

src/styledComponents.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { styled } from './utils'
33
export const Panel = styled(
44
'div',
55
(props, theme) => ({
6-
fontSize: '1rem',
6+
fontSize: 'clamp(12px, 1.5vw, 16px)',
77
display: 'flex',
88
backgroundColor: theme.background,
99
color: theme.foreground,
@@ -18,57 +18,57 @@ export const Panel = styled(
1818

1919
export const Button = styled('button', (props, theme) => ({
2020
appearance: 'none',
21-
fontSize: '.9rem',
21+
fontSize: '.9em',
2222
fontWeight: 'bold',
2323
background: theme.gray,
2424
border: '0',
25-
borderRadius: '.3rem',
25+
borderRadius: '.3em',
2626
color: 'white',
27-
padding: '.5rem',
27+
padding: '.5em',
2828
opacity: props.disabled ? '.5' : undefined,
2929
cursor: 'pointer',
3030
}))
3131

3232
export const QueryKeys = styled('span', {
3333
display: 'inline-block',
34-
fontSize: '0.9rem',
34+
fontSize: '0.9em',
3535
})
3636

3737
export const QueryKey = styled('span', {
3838
display: 'inline-flex',
3939
alignItems: 'center',
40-
padding: '.2rem .4rem',
40+
padding: '.2em .4em',
4141
fontWeight: 'bold',
4242
textShadow: '0 0 10px black',
43-
borderRadius: '.2rem',
43+
borderRadius: '.2em',
4444
})
4545

4646
export const Code = styled('code', {
47-
fontSize: '.9rem',
47+
fontSize: '.9em',
4848
})
4949

5050
export const Input = styled('input', {
5151
border: 0,
52-
borderRadius: '.2rem',
53-
fontSize: '.9rem',
54-
padding: '.3rem .4rem',
52+
borderRadius: '.2em',
53+
fontSize: '.9em',
54+
padding: '.3em .4em',
5555
})
5656

5757
export const Select = styled('select', {
5858
display: `inline-block`,
59-
fontSize: `.9rem`,
59+
fontSize: `.9em`,
6060
fontFamily: `sans-serif`,
6161
fontWeight: 'normal',
6262
lineHeight: `1.3`,
63-
padding: `.3rem 1.5rem .3rem .5rem`,
63+
padding: `.3em 1.5em .3em .5em`,
6464
height: 'auto',
6565
border: 0,
66-
borderRadius: `.2rem`,
66+
borderRadius: `.2em`,
6767
appearance: `none`,
6868
WebkitAppearance: 'none',
6969
backgroundColor: `#fff`,
7070
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>")`,
7171
backgroundRepeat: `no-repeat`,
72-
backgroundPosition: `right .55rem center`,
72+
backgroundPosition: `right .55em center`,
7373
backgroundSize: `.65em auto, 100%`,
7474
})

0 commit comments

Comments
 (0)