openreplay/frontend/app/components/ui/Checkbox/Checkbox.tsx
Shekar Siri 2ed5cac986
Webpack upgrade and dependency cleanup (#523)
* change(ui) - webpack update
* change(ui) - api optimize and other fixes
2022-06-03 16:47:38 +02:00

20 lines
No EOL
467 B
TypeScript

import React from 'react';
import cn from 'classnames';
interface Props {
classNam?: string;
label?: string;
[x: string]: any;
}
export default (props: Props) => {
const { className = '', label = '', ...rest } = props;
return (
<label className={ cn("flex items-center cursor-pointer", className)}>
<input
type="checkbox"
{ ...rest }
/>
{label && <span className="ml-2 select-none">{label}</span>}
</label>
)
};