Skip to content

Commit

Permalink
fix(Input): simplify type
Browse files Browse the repository at this point in the history
  • Loading branch information
eirikbacker committed Oct 10, 2024
1 parent 5d3307a commit 96bfa21
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions packages/react/src/components/form/Input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,7 @@ export type InputProps = {
readOnly?: boolean;
/** Set role, i.e. `switch` when `checkbox` or `radio` */
role?: InputAttr['role'];
} & Omit<InputAttr, 'size' | 'prefix' | 'role' | 'type'> &
(
| { type: 'checkbox' | 'radio'; role?: 'switch' | InputAttr['role'] }
| {
type?: Omit<InputAttr['type'], 'checkbox' | 'radio'> | never;
role?: Omit<InputAttr['role'], 'switch'>;
}
);
} & Omit<InputAttr, 'size' | 'prefix' | 'role' | 'type'>;

/** Input field
*
Expand Down

0 comments on commit 96bfa21

Please sign in to comment.