save: public switch

This commit is contained in:
muerwre 2018-12-18 12:19:02 +07:00
parent a1bb4da475
commit 69f23c9e48
6 changed files with 83 additions and 10 deletions

15
src/components/Switch.jsx Normal file
View file

@ -0,0 +1,15 @@
// @flow
import React from 'react';
import classnames from 'classnames';
type Props = {
active: Boolean,
onPress: Function,
}
export const Switch = ({ active, onPress = () => {} }: Props) => (
<div
className={classnames('switch', { active })}
onMouseDown={onPress}
/>
);