mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
moved components to TypeScript
This commit is contained in:
parent
85b8860862
commit
0a01c91271
54 changed files with 2771 additions and 5134 deletions
14
src/components/Switch.tsx
Normal file
14
src/components/Switch.tsx
Normal file
|
@ -0,0 +1,14 @@
|
|||
// @flow
|
||||
import * as 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}
|
||||
/>
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue