UNPKG

@metamask/design-system-react-native

Version:
1 lines 844 B
{"version":3,"file":"TextOrChildren.cjs","sourceRoot":"","sources":["../../../../src/components/temp-components/TextOrChildren/TextOrChildren.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,+CAAkC;AAI3B,MAAM,cAAc,GAAG,CAAC,EAC7B,QAAQ,EACR,SAAS,GACW,EAAE,EAAE;IACxB,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;QAChC,OAAO,CAAC,WAAI,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,WAAI,CAAC,CAAC;KAC/C;IACD,OAAO,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC;AACzB,CAAC,CAAC;AARW,QAAA,cAAc,kBAQzB","sourcesContent":["import React from 'react';\n\nimport { Text } from '../../Text';\n\nimport type { TextOrChildrenProps } from './TextOrChildren.types';\n\nexport const TextOrChildren = ({\n children,\n textProps,\n}: TextOrChildrenProps) => {\n if (typeof children === 'string') {\n return <Text {...textProps}>{children}</Text>;\n }\n return <>{children}</>;\n};\n"]}