@audira/carbon-react-native
Version:
Build React Native apps with component and shared patterns using Carbon
33 lines (32 loc) • 1.09 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.SubtitleLink = void 0;
var _react = require("react");
var _index = require("../../../carbon-style-sheet/index.js");
var _index2 = require("../../../contexts/index.js");
var _variantContext = require("../_variant-context.js");
var _index3 = require("../subtitle/index.js");
var _jsxRuntime = require("react/jsx-runtime");
const SubtitleLink = exports.SubtitleLink = /*#__PURE__*/(0, _react.forwardRef)(function SubtitleLink({
style,
...props
}, ref) {
(0, _react.useContext)(_index2.ThemeContext);
const variantContext = (0, _react.useContext)(_variantContext.VariantContext);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index3.Subtitle, {
...props,
ref: ref,
style: [mapTextColorStyle[variantContext.color], style]
});
});
const mapTextColorStyle = _index.CarbonStyleSheet.create({
low_contrast: {
color: _index.CarbonStyleSheet.color.link_primary
},
high_contrast: {
color: _index.CarbonStyleSheet.color.link_inverse
}
});
//# sourceMappingURL=SubtitleLink.js.map