UNPKG

@cap3/capitano-components

Version:
33 lines 1.36 kB
"use strict"; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) t[p[i]] = s[p[i]]; return t; }; Object.defineProperty(exports, "__esModule", { value: true }); const capitano_theme_1 = require("@cap3/capitano-theme"); const React = require("react"); exports.Text = capitano_theme_1.styled("span")(({ theme }) => ({ fontFamily: theme.typography.fontFamily.base, fontSize: theme.typography.fontSize.medium, })); exports.MonoText = capitano_theme_1.styled("span")(({ theme }) => ({ fontFamily: theme.typography.fontFamily.monospace, fontSize: theme.typography.fontSize.medium, })); const EllipsisTextBlock = capitano_theme_1.styled(exports.Text)(({}) => ({ textOverflow: "ellipsis", width: "100%", overflow: "hidden", whiteSpace: "nowrap", display: "inline-block", })); exports.EllipsisText = (_a) => { var { children } = _a, rest = __rest(_a, ["children"]); return (React.createElement(EllipsisTextBlock, Object.assign({ title: children }, rest), children)); }; //# sourceMappingURL=Text.js.map