Skip to content

Commit

Permalink
Add readOnly prop to Checkbox, fix error on ComponentPage (#1553)
Browse files Browse the repository at this point in the history
  • Loading branch information
robines authored Oct 25, 2024
1 parent 862cceb commit 8cfc22f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions frontend/src/Components/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export type CheckboxProps = {
checked?: boolean;
className?: string;
onChange?: (...event: unknown[]) => void;
readOnly?: boolean;
};

export const Checkbox = React.forwardRef<HTMLInputElement, CheckboxProps>(({ className, ...props }, ref) => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/Pages/ComponentPage/ComponentPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function ComponentPage() {
<h2>Checkboxes:</h2>
<Checkbox />
<br />
<Checkbox checked />
<Checkbox checked readOnly />
<br />
<Checkbox disabled />
<br />
Expand Down

0 comments on commit 8cfc22f

Please sign in to comment.