UNPKG

@vlinderclimate/net-zero-ui

Version:

<div align="center"> <img src="https://storage.yandexcloud.net/static.vlinderstorage.com/Telegram_VlinderTech.png" width=200 /> </div> <h1 align="center">Net Zero UI kit</h1>

105 lines (98 loc) 3.87 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var tslib_es6 = require('../tslib.es6-9240d9d1.js'); var jsxRuntime = require('react/jsx-runtime'); var styles = require('@mui/material/styles'); var MuiRadio = require('@mui/material/Radio'); var theme_typography = require('../theme/typography.js'); function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var MuiRadio__default = /*#__PURE__*/_interopDefaultLegacy(MuiRadio); /** * Styles */ var StyledRadio = styles.styled(MuiRadio__default["default"])(function (_a) { var _b, _c, _d, _e; var theme = _a.theme; return (_b = { ".MuiTypography-root": tslib_es6.__assign(tslib_es6.__assign({}, theme_typography["default"].heroParagraph.main), (_c = {}, _c[theme.breakpoints.down("sm")] = tslib_es6.__assign({}, theme_typography["default"].heroParagraph.mobile), _c)), ".MuiSvgIcon-root": { width: 24, height: 24, "&:last-of-type": { width: 18, height: 18, margin: "3px 0 0 3px" } } }, _b[theme.breakpoints.down("sm")] = { ".MuiSvgIcon-root": { width: 19, height: 19, "&:last-of-type": { width: 12, height: 12, margin: "3.5px 0 0 3.5px" } } }, _b["&.MuiRadio-root"] = (_d = { marginRight: 8, marginLeft: 0, padding: 0, backgroundColor: "transparent !important", color: theme.palette.gray[500] + " !important", position: "static", "&.Mui-checked": { color: theme.palette.text.primary + " !important", "& ~ .MuiFormControlLabel-label": { color: theme.palette.text.primary + " !important" } } }, _d[theme.breakpoints.down("sm")] = { marginLeft: 0 }, _d), _b["&.MuiRadio-bordered.MuiRadio-root"] = (_e = { backgroundColor: "transparent !important", color: theme.palette.gray[500] + " !important", position: "static", padding: "10px 12px 10px 16px", marginRight: 0, "&:before": { content: "''", border: "1px solid", position: "absolute", top: 0, left: 0, width: "100%", height: "100%" }, "& ~ .MuiFormControlLabel-label": { padding: "10px 24px 10px 0" }, "&.Mui-checked": { color: theme.palette.text.primary + " !important", "& ~ .MuiFormControlLabel-label": { color: theme.palette.text.primary + " !important" } } }, _e[theme.breakpoints.down("sm")] = { padding: "10px 8px 10px 12px", "& ~ .MuiFormControlLabel-label": { padding: "8px 16px 8px 0" } }, _e), _b); }); /** * Components */ var Radio = function (_a) { var _b = _a.variant, variant = _b === void 0 ? "default" : _b, rest = tslib_es6.__rest(_a, ["variant"]); return jsxRuntime.jsx(StyledRadio, tslib_es6.__assign({ className: "MuiRadio-" + variant }, rest), void 0); }; exports["default"] = Radio;