UNPKG

@metamask/design-system-react-native

Version:
24 lines 1.28 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.BadgeStatus = void 0; const design_system_twrnc_preset_1 = require("@metamask/design-system-twrnc-preset"); const react_1 = __importDefault(require("react")); const react_native_1 = require("react-native/index.js"); const types_1 = require("../../types/index.cjs"); const BadgeStatus_constants_1 = require("./BadgeStatus.constants.cjs"); const BadgeStatus = ({ status, size = types_1.BadgeStatusSize.Md, hasBorder = true, twClassName = '', style, ...props }) => { const tw = (0, design_system_twrnc_preset_1.useTailwind)(); return (<react_native_1.View style={[ tw `self-start rounded-full ${hasBorder ? 'border-2 border-background-default' : ''} ${twClassName}`, style, ]} {...props}> <react_native_1.View style={[ tw `rounded-full border-2 ${BadgeStatus_constants_1.TWCLASSMAP_BADGESTATUS_SIZE[size]} ${BadgeStatus_constants_1.TWCLASSMAP_BADGESTATUS_STATUS_CIRCLE[status]} `, ]}/> </react_native_1.View>); }; exports.BadgeStatus = BadgeStatus; //# sourceMappingURL=BadgeStatus.cjs.map