mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-26 03:26:41 +07:00
save: public switch
This commit is contained in:
parent
a1bb4da475
commit
69f23c9e48
6 changed files with 83 additions and 10 deletions
15
src/components/Switch.jsx
Normal file
15
src/components/Switch.jsx
Normal 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}
|
||||
/>
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue