@anoki/fse-ui
Version:
FSE UI components library
3 lines (2 loc) • 895 B
JavaScript
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/Feedback/Rating.css');const e=require("./index.cjs237.js");;/* empty css */const c=require("./index.cjs240.js"),l=require("./index.cjs239.js"),o=require("./index.cjs222.js"),t=5,u=c.lodashExports.range(1,t+1);function x({onClick:i,rating:n=0}){const a=s=>s<=n;return e.jsxRuntimeExports.jsxs("fieldset",{className:"rating",children:[e.jsxRuntimeExports.jsx("legend",{className:"visually-hidden",children:"Valutazione"}),u.map((s,r)=>e.jsxRuntimeExports.jsxs("button",{onClick:()=>i(s),className:l.clsx("star black-focus",{active:a(s)}),children:[e.jsxRuntimeExports.jsx(o.Rating,{className:"icon icon-sm"}),e.jsxRuntimeExports.jsxs("span",{className:"visually-hidden",children:["Valuta ",s," stelle su ",t]})]},r))]})}exports.Rating=x;
//# sourceMappingURL=index.cjs395.js.map