orchidmap-front/src/components/Switch.tsx
2020-01-08 12:51:19 +07:00

14 lines
291 B
TypeScript

// @flow
import React from 'react';
import classnames from 'classnames';
type Props = {
active: boolean,
onPress?: () => void,
}
export const Switch = ({ active, onPress = () => {} }: Props) => (
<div
className={classnames('switch', { active })}
onMouseDown={onPress}
/>
);