Skip to content

Commit d905339

Browse files
committed
remove unused props from Label component to reduce code branches
1 parent f3ebb45 commit d905339

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

packages/editor/src/ColorPicker.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,14 @@ const Input = (props: InputProps) => (
6363
/>
6464
)
6565

66-
type LabelProps = React.PropsWithoutRef<JSX.IntrinsicElements['label']> & {
67-
width?: string | number
68-
flex?: number
69-
}
66+
type LabelProps = React.PropsWithoutRef<JSX.IntrinsicElements['label']>
7067

71-
const Label = ({ width = '100%', flex = 1, ...props }: LabelProps) => (
68+
const Label = (props: LabelProps) => (
7269
<label
7370
{...props}
7471
sx={{
7572
display: 'block',
76-
width,
73+
width: '100%',
7774
fontSize: 10,
7875
input: {
7976
':focus': {

0 commit comments

Comments
 (0)