UNPKG

2.44 kBSource Map (JSON)View Raw
1{"version":3,"file":"RadioListItem.js","sources":["../src/components/Radio/RadioListItem.js"],"sourcesContent":["import React from 'react'\nimport PropTypes from 'prop-types'\nimport Radio from '../Input/Radio'\nimport { useTheme } from '../../theme'\nimport { unselectable } from '../../utils'\nimport { GU } from '../../style'\n\nconst RadioListItem = React.memo(function RadioListItem({\n description,\n index,\n title,\n}) {\n const theme = useTheme()\n return (\n <label\n css={`\n display: flex;\n ${unselectable()};\n & + & {\n margin-top: ${1 * GU}px;\n }\n `}\n >\n <Radio\n id={index}\n css={`\n flex-shrink: 0;\n `}\n />\n <div\n css={`\n flex-grow: 1;\n margin-left: 12px;\n padding: 12px 12px;\n border-radius: 3px;\n transition: border 100ms ease-in-out;\n cursor: pointer;\n border: 1px ${theme.border} solid;\n &:hover {\n border-color: ${theme.accent.alpha(0.35)};\n }\n `}\n >\n <strong>{title}</strong>\n <div\n css={`\n margin-top: ${0.5 * GU}px;\n `}\n >\n {description}\n </div>\n </div>\n </label>\n )\n})\n\nRadioListItem.propTypes = {\n description: PropTypes.node.isRequired,\n index: PropTypes.number.isRequired,\n title: PropTypes.node.isRequired,\n}\n\nexport default RadioListItem\n"],"names":["RadioListItem","React","memo","description","index","title","theme","useTheme","unselectable","GU","border","accent","alpha","propTypes","PropTypes","node","isRequired","number"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAMA,aAAa,gBAAGC,cAAK,CAACC,IAAN,CAAW,SAASF,aAAT,OAI9B;AAAA,MAHDG,WAGC,QAHDA,WAGC;AAAA,MAFDC,KAEC,QAFDA,KAEC;AAAA,MADDC,KACC,QADDA,KACC;AACD,MAAMC,KAAK,GAAGC,cAAQ,EAAtB;AACA,sBACEN;AAAA,UAGMO,gBAAY,EAHlB;AAAA,WAKoB,IAAIC;AALxB,kBASER;AACE,IAAA,EAAE,EAAEG;AADN,IATF,eAeEH;AAAA,WAQkBK,KAAK,CAACI,MARxB;AAAA,WAUsBJ,KAAK,CAACK,MAAN,CAAaC,KAAb,CAAmB,IAAnB;AAVtB,kBAcEX,6CAASI,KAAT,CAdF,eAeEJ;AAAA,WAEkB,MAAMQ;AAFxB,KAKGN,WALH,CAfF,CAfF,CADF;AAyCD,CA/CqB,CAAtB;AAiDAH,aAAa,CAACa,SAAd,GAA0B;AACxBV,EAAAA,WAAW,EAAEW,eAAS,CAACC,IAAV,CAAeC,UADJ;AAExBZ,EAAAA,KAAK,EAAEU,eAAS,CAACG,MAAV,CAAiBD,UAFA;AAGxBX,EAAAA,KAAK,EAAES,eAAS,CAACC,IAAV,CAAeC;AAHE,CAA1B;;;;"}
\No newline at end of file