hensei-web/components/reps/RepSegment/index.tsx
Justin Edmund 4c5fb3c28d Rename all files and fix imports
* Renaming index.scss files to index.module.scss
* Changing `import from` to `import styles from`
2023-06-23 13:19:38 -07:00

34 lines
799 B
TypeScript

import React, { PropsWithChildren } from 'react'
import styles from './index.module.scss'
interface Props {
controlGroup: string
inputName: string
name: string
selected: boolean
onClick: (event: React.ChangeEvent<HTMLInputElement>) => void
}
const RepSegment = ({ children, ...props }: PropsWithChildren<Props>) => {
return (
<div className="RepSegment">
<input
name={props.controlGroup}
id={props.inputName}
value={props.inputName}
type="radio"
checked={props.selected}
onChange={props.onClick}
/>
<label htmlFor={props.inputName}>
<div className="Wrapper">
{children}
<div className="Title">{props.name}</div>
</div>
</label>
</div>
)
}
export default RepSegment