/** * Copyright (c) Paymium. * * This source code is licensed under the MIT license found in the * LICENSE file in the root of this projects source tree. */ import { composeStyles } from '@crossed/styled'; import { Text, TextProps } from '../../typography'; import { styles } from './styles'; import { PropsWithChildren, useContext } from 'react'; import { localContext } from './context'; type LabelProps = PropsWithChildren; export const SwitchLabel = ({ children, id, ...props }: LabelProps) => { const { value, disabled } = useContext(localContext); return typeof children === 'string' ? ( {children} ) : ( children ); };