Skip to content

Commit 870a964

Browse files
committed
Fix checkboxes
1 parent e49e6ee commit 870a964

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

resources/scripts/components/elements/inputs/Checkbox.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ import React, { forwardRef } from 'react';
22
import classNames from 'classnames';
33
import styles from './styles.module.css';
44

5-
export default forwardRef<HTMLInputElement, React.ComponentProps<'input'>>(({ className, ...props }, ref) => (
6-
<input ref={ref} className={classNames('form-input', styles.text_input, className)} {...props} />
5+
type Props = Omit<React.ComponentProps<'input'>, 'type'>;
6+
7+
export default forwardRef<HTMLInputElement, Props>(({ className, ...props }, ref) => (
8+
<input
9+
ref={ref}
10+
type={'checkbox'}
11+
className={classNames('form-input', styles.checkbox_input, className)}
12+
{...props}
13+
/>
714
));

resources/scripts/components/elements/inputs/styles.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.checkbox {
1+
.checkbox_input {
22
@apply w-4 h-4 rounded-sm border-neutral-500 bg-neutral-600 text-primary-500;
33

44
&:focus, &:active {

0 commit comments

Comments
 (0)