mirror of
https://github.com/hanzo-io/chat.git
synced 2026-10-30 18:57:58 +00:00
21 lines
441 B
TypeScript
21 lines
441 B
TypeScript
import { Switch } from 'react-native';
|
|
|
|
import { useColorScheme } from '@hooks/useColorScheme';
|
|
import { COLORS } from '@theme/colors';
|
|
|
|
function Toggle(props: React.ComponentPropsWithoutRef<typeof Switch>) {
|
|
const { colors } = useColorScheme();
|
|
return (
|
|
<Switch
|
|
trackColor={{
|
|
true: colors.primary,
|
|
false: colors.grey,
|
|
}}
|
|
thumbColor={COLORS.white}
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export { Toggle };
|