mirror of
https://git.sr.ht/~ashkeel/strimertul
synced 2024-09-18 01:50:50 +00:00
refactor: cleanup shared theme props
This commit is contained in:
parent
75a9a7183e
commit
0e363ff829
2 changed files with 4 additions and 5 deletions
|
@ -1,7 +1,6 @@
|
||||||
import * as UnstyledLabel from '@radix-ui/react-label';
|
import * as UnstyledLabel from '@radix-ui/react-label';
|
||||||
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
||||||
import * as ToggleGroup from '@radix-ui/react-toggle-group';
|
import * as ToggleGroup from '@radix-ui/react-toggle-group';
|
||||||
import { CSS } from '@stitches/react';
|
|
||||||
import { styled, theme } from './theme';
|
import { styled, theme } from './theme';
|
||||||
import ControlledInput from '../components/utils/ControlledInput';
|
import ControlledInput from '../components/utils/ControlledInput';
|
||||||
import PasswordField from '../components/utils/PasswordField';
|
import PasswordField from '../components/utils/PasswordField';
|
||||||
|
@ -47,7 +46,7 @@ export const Label = styled(UnstyledLabel.Root, {
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
});
|
});
|
||||||
|
|
||||||
const inputStyles: CSS = {
|
const inputStyles = {
|
||||||
all: 'unset',
|
all: 'unset',
|
||||||
fontWeight: '300',
|
fontWeight: '300',
|
||||||
border: '1px solid $gray6',
|
border: '1px solid $gray6',
|
||||||
|
@ -76,7 +75,7 @@ const inputStyles: CSS = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
} as const;
|
||||||
|
|
||||||
export const InputBox = styled('input', inputStyles);
|
export const InputBox = styled('input', inputStyles);
|
||||||
export const ControlledInputBox = styled(ControlledInput, inputStyles);
|
export const ControlledInputBox = styled(ControlledInput, inputStyles);
|
||||||
|
@ -232,7 +231,7 @@ const button = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
} as const;
|
||||||
|
|
||||||
export const MultiToggle = styled(ToggleGroup.Root, {
|
export const MultiToggle = styled(ToggleGroup.Root, {
|
||||||
display: 'inline-flex',
|
display: 'inline-flex',
|
||||||
|
|
|
@ -24,7 +24,7 @@ const itemStyles = {
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
userSelect: 'none',
|
userSelect: 'none',
|
||||||
};
|
} as const;
|
||||||
|
|
||||||
export const ToolbarButton = styled(ToolbarPrimitive.Button, {
|
export const ToolbarButton = styled(ToolbarPrimitive.Button, {
|
||||||
...itemStyles,
|
...itemStyles,
|
||||||
|
|
Loading…
Reference in a new issue