UNPKG

@gluestack-ui/themed

Version:

A universal themed components for React Native, Next.js & React

28 lines (27 loc) 725 B
import { styled } from '@gluestack-style/react'; import { Switch } from 'react-native'; export default styled(Switch, {}, { componentName: 'Switch', resolveProps: [ 'thumbColor', 'trackColor', 'activeThumbColor', 'ios_backgroundColor', ], }, { propertyTokenMap: { trackColor: 'colors', thumbColor: 'colors', activeThumbColor: 'colors', ios_backgroundColor: 'colors', }, propertyResolver: { trackColor: (rawValue, resolver) => { const resolveColor = { true: resolver(rawValue.true), false: resolver(rawValue.false), }; return resolveColor; }, }, });