mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 19:27:52 +01:00
* Update webpacker to 4.3.0 * Update Rails to 6.0.5 * Update webpack-dev-server to 3.11.0 * Update @rails packages to 6.0.5 in package.json
17 lines
427 B
TypeScript
17 lines
427 B
TypeScript
import * as React from 'react';
|
|
|
|
interface Props {
|
|
label?: string;
|
|
onClick: React.MouseEventHandler;
|
|
checked?: boolean;
|
|
htmlId?: string;
|
|
}
|
|
|
|
const Switch = ({ label, onClick, checked, htmlId }: Props) => (
|
|
<div className="checkboxSwitch">
|
|
<input type="checkbox" id={htmlId} onClick={onClick} checked={checked} onChange={() => null} />
|
|
<label htmlFor={htmlId}>{label}</label>
|
|
</div>
|
|
);
|
|
|
|
export default Switch; |