UNPKG

@audira/carbon-react-native

Version:

Build React Native apps with component and shared patterns using Carbon

31 lines (30 loc) 903 B
"use strict"; import { forwardRef } from 'react'; import { VariantContextProvider } from "../../_VariantContextProvider.js"; import { Base } from "../../base/index.js"; import { Subtitle } from "../../subtitle/index.js"; import { jsx as _jsx } from "react/jsx-runtime"; export const CalloutVariant = /*#__PURE__*/forwardRef(function CalloutVariant({ color, Icon, subtitle, subtitleStyle, ...props }, ref) { return /*#__PURE__*/_jsx(VariantContextProvider, { color: color, children: /*#__PURE__*/_jsx(Base, { ...props, inline: false, Icon: Icon, iconClose: false, body: subtitle && (typeof subtitle === 'string' || typeof subtitle === 'number') ? /*#__PURE__*/_jsx(Subtitle, { style: subtitleStyle, children: subtitle }) : subtitle, nodes: undefined, ref: ref }) }); }); //# sourceMappingURL=CalloutVariant.js.map