UNPKG

@navinc/base-react-components

Version:
26 lines (25 loc) 1.33 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import styled from 'styled-components'; import Copy from './copy'; import Radio from './radio.js'; const AsidePill = styled(Copy) ` background-color: ${({ theme }) => theme.greenSheen200}; padding: 4px 8px; border-radius: 12px; display: inline-block; `; const Toggles = styled.div ` display: flex; flex-wrap: wrap; & > ${Radio} { min-width: 240px; margin: 8px; padding: 0 16px; } `; export default ({ asideContent, toggleA, toggleB, toggleCondition, toggleCallback }) => (_jsxs(Toggles, { children: [_jsx(Radio, { "data-testid": `upgrade-plan-page:${toggleA}-radio-toggle`, checked: !toggleCondition, label: toggleA, onChange: () => { toggleCallback(!toggleCondition); }, checkedBackgroundColor: ({ theme }) => theme.neutral100, hasBorder: true }, void 0), _jsx(Radio, { "data-testid": `upgrade-plan-page:${toggleB}-radio-toggle`, checked: toggleCondition, label: toggleB, hasBorder: true, onChange: () => { toggleCallback(!toggleCondition); }, checkedBackgroundColor: ({ theme }) => theme.neutral100, asideContent: _jsx(AsidePill, Object.assign({ size: "xs" }, { children: asideContent }), void 0) }, void 0)] }, void 0)); //# sourceMappingURL=wrapped-ab-content-toggle.js.map