UNPKG

@gechiui/components

Version:
28 lines (23 loc) 506 B
/** * External dependencies */ import { View, Text } from 'react-native'; /** * GeChiUI dependencies */ import { withPreferredColorScheme } from '@gechiui/compose'; /** * Internal dependencies */ import styles from './style.scss'; const Badge = ( { label, children, show = true } ) => { return ( <> { children } <View style={ styles.badgeContainer }> { show && <Text style={ styles.badge }>{ label }</Text> } </View> </> ); }; export default withPreferredColorScheme( Badge );