const React = require('react'); const constants = require('../../shared/constants'); const Styled = require('styled-components'); const fns = require('../../shared/functions'); const { boxes } = constants; const { remcalc } = fns; const { default: styled, } = Styled; const CustomInputCircle = ` content: ''; position: absolute; width: 14px; height: 14px; background: #646464; top: -16px; left: 12px; border-radius: 100%; `; const StyledInput = styled.input` visibility: hidden; display: none; &:checked + span::after { ${CustomInputCircle} } &:disabled + span { background-color: #F9f9F9; } &:disabled + span::after { opacity: 0.3; ${CustomInputCircle} } `; const StyledLabel = styled.label` `; const StyledContent = styled.div` margin-left: ${remcalc(45)}; padding-top: ${remcalc(10)}; `; const StyledSpan = styled.span` color: #646464; position: relative; &::before { content: ''; position: absolute; width: ${remcalc(26)}; height: ${remcalc(26)}; background-color: #FFFFFF; box-shadow: ${boxes.insetShaddow}; border: ${boxes.border.unchecked}; top: 5px; left: 5px; border-radius: 100%; } &:hover { &::after { opacity: 0.3; } } `; const Radio = ({ checked, children, className, defaultChecked, disabled = false, form, id, label, name, onChange, readOnly, required, selectionDirection, style, tabIndex, value }) => { return ( {children} ); }; Radio.propTypes = { checked: React.PropTypes.bool, children: React.PropTypes.node, className: React.PropTypes.string, defaultChecked: React.PropTypes.bool, disabled: React.PropTypes.bool, form: React.PropTypes.string, id: React.PropTypes.string, label: React.PropTypes.string, name: React.PropTypes.string, onChange: React.PropTypes.func, readOnly: React.PropTypes.bool, required: React.PropTypes.bool, selectionDirection: React.PropTypes.string, style: React.PropTypes.object, tabIndex: React.PropTypes.string, value: React.PropTypes.string.isRequired }; module.exports = Radio;