fix(component): adjust renaming style (#7654)

This commit is contained in:
CatsJuice
2024-07-31 02:26:33 +00:00
parent 12a2f929f8
commit 083123cdfb
2 changed files with 6 additions and 4 deletions

View File

@@ -45,6 +45,7 @@ export const RenameModal = ({
onPointerDownOutside: handleRename, onPointerDownOutside: handleRename,
sideOffset: -12, sideOffset: -12,
onClick: e => e.stopPropagation(), onClick: e => e.stopPropagation(),
style: { borderRadius: 10, padding: 8 },
}} }}
items={ items={
<Input <Input
@@ -55,7 +56,7 @@ export const RenameModal = ({
onEnter={handleRename} onEnter={handleRename}
onKeyDown={onKeyDown} onKeyDown={onKeyDown}
data-testid="rename-modal-input" data-testid="rename-modal-input"
style={{ width: 220, height: 34 }} style={{ width: 220, height: 34, borderRadius: 4 }}
/> />
} }
> >

View File

@@ -1,13 +1,14 @@
import { cssVar } from '@toeverything/theme'; import { cssVar } from '@toeverything/theme';
import { cssVarV2 } from '@toeverything/theme/v2';
import { style } from '@vanilla-extract/css'; import { style } from '@vanilla-extract/css';
export const inputWrapper = style({ export const inputWrapper = style({
width: '100%', width: '100%',
height: 28, height: 28,
lineHeight: '22px', lineHeight: '22px',
gap: '10px', gap: '10px',
color: cssVar('textPrimaryColor'), color: cssVarV2('text/primary'),
border: '1px solid', border: '1px solid',
backgroundColor: cssVar('white'), backgroundColor: cssVarV2('layer/background/primary'),
borderRadius: 8, borderRadius: 8,
display: 'flex', display: 'flex',
justifyContent: 'center', justifyContent: 'center',
@@ -44,7 +45,7 @@ export const inputWrapper = style({
borderColor: cssVar('borderColor'), borderColor: cssVar('borderColor'),
}, },
'&.default:is(:focus-within, :focus, :focus-visible)': { '&.default:is(:focus-within, :focus, :focus-visible)': {
borderColor: cssVar('primaryColor'), borderColor: cssVarV2('button/primary'),
outline: 'none', outline: 'none',
boxShadow: '0px 0px 0px 2px rgba(30, 150, 235, 0.30);', boxShadow: '0px 0px 0px 2px rgba(30, 150, 235, 0.30);',
}, },