mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
14 lines
296 B
TypeScript
14 lines
296 B
TypeScript
// @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}
|
|
/>
|
|
);
|