@wordpress/components
Version:
UI components for WordPress.
32 lines (30 loc) • 735 B
JavaScript
/**
* External dependencies
*/
import { View, Text } from 'react-native';
/**
* WordPress dependencies
*/
import { withPreferredColorScheme } from '@wordpress/compose';
/**
* Internal dependencies
*/
import styles from './style.scss';
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
const Badge = ({
label,
children,
show = true
}) => {
return /*#__PURE__*/_jsxs(_Fragment, {
children: [children, /*#__PURE__*/_jsx(View, {
style: styles.badgeContainer,
children: show && /*#__PURE__*/_jsx(Text, {
style: styles.badge,
children: label
})
})]
});
};
export default withPreferredColorScheme(Badge);
//# sourceMappingURL=index.native.js.map