UNPKG

@audira/carbon-react-native

Version:

Build React Native apps with component and shared patterns using Carbon

41 lines (40 loc) 1.36 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ActionableVariant = void 0; var _react = require("react"); var _VariantContextProvider = require("../../_VariantContextProvider.js"); var _index = require("../../base/index.js"); var _index2 = require("../../subtitle/index.js"); var _ButtonTertiary = require("../_ButtonTertiary.js"); var _jsxRuntime = require("react/jsx-runtime"); const ActionableVariant = exports.ActionableVariant = /*#__PURE__*/(0, _react.forwardRef)(function ActionableVariant({ color, Icon, subtitle, subtitleStyle, buttonProps, ...props }, ref) { return /*#__PURE__*/(0, _jsxRuntime.jsx)(_VariantContextProvider.VariantContextProvider, { color: color, children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Base, { ...props, inline: false, Icon: Icon, iconClose: true, body: subtitle && (typeof subtitle === 'string' || typeof subtitle === 'number') ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Subtitle, { style: subtitleStyle, children: subtitle }) : subtitle, nodes: { beforeContentContainerEnd: buttonProps ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonTertiary.ButtonTertiary, { ...buttonProps }) : undefined }, ref: ref }) }); }); //# sourceMappingURL=ActionableVariant.js.map