UNPKG

@yeonpm/react

Version:

A library that collects frequently used components and custom hooks in react projects

3 lines (2 loc) 1.14 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,n,s=require("../../../yeonpm/yeonpm-react/node_modules/tslib/tslib.es6.js"),r=require("react/jsx-runtime"),t=require("react"),a=require("@emotion/styled"),o=require("../../../yeonpm/yeonpm-react/node_modules/react-style-props/dist/esm/index.js"),i=t.forwardRef(function(e,n){var t=e.span,a=e.children,i=s.__rest(e,["span","children"]),c={},_={};Object.keys(i).forEach(function(e){e in o.fontVariants&&"boolean"==typeof i[e]?c[e]=i[e]:_[e]=i[e]});var m={};Object.entries(c).forEach(function(e){var n=e[0];e[1]&&n in o.fontVariants&&(m=s.__assign(s.__assign({},m),o.fontVariants[n]))});var p=s.__assign(s.__assign({},m),_),f=o.resolveProps(p),d=f.styleString,y=f.otherProps,j=t?u:l;return r.jsx(j,s.__assign({ref:n,css:d},y,{className:"yeonpm-txt".concat(y.className?" ".concat(y.className):""),children:a}))}),c=t.memo(i),l=a("p")(e||(e=s.__makeTemplateObject(["\n ","\n"],["\n ","\n"])),function(e){return e.css}),u=a("span")(n||(n=s.__makeTemplateObject(["\n ","\n"],["\n ","\n"])),function(e){return e.css});exports.default=c; //# sourceMappingURL=index.js.map