We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d84fc51 commit 06bd589Copy full SHA for 06bd589
src/components/common/input/RadioInput.tsx
@@ -0,0 +1,30 @@
1
+import clsx from 'clsx'
2
+import React from 'react'
3
+
4
+interface RadioInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
5
+ label: string
6
+}
7
8
+export const RadioInput = ({
9
+ label,
10
+ className = '',
11
+ checked,
12
+ disabled,
13
+ ...props
14
+}: RadioInputProps) => {
15
+ return (
16
+ <label
17
+ className={clsx(
18
+ 'flex cursor-pointer items-center',
19
+ disabled && 'cursor-not-allowed opacity-50',
20
+ className
21
+ )}
22
+ >
23
+ <input type='radio' checked={checked} disabled={disabled} {...props} />
24
+ <span className='custom-radio'></span>
25
+ <span className='text-body-2 ml-4 h-22 font-normal leading-body2 text-gray-800'>
26
+ {label}
27
+ </span>
28
+ </label>
29
+ )
30
0 commit comments