Skip to content

Commit

Permalink
update: disabled radio button status
Browse files Browse the repository at this point in the history
  • Loading branch information
Maicon Silva committed Feb 28, 2020
1 parent e034598 commit e760e76
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/Form/RadioButton/RadioButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function RadioButton({
return (
<RadioButtonWrapper
htmlFor={id}
disabled={disabled}
{...rest}
>
<RadioButtonInput
Expand Down
10 changes: 10 additions & 0 deletions src/components/Form/RadioButton/RadioButtonStyled.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import styled from '@emotion/styled';
import { css } from '@emotion/core';
import { colors } from '../../../utils';

export const RadioButtonWrapper = styled.label`
Expand All @@ -10,6 +11,15 @@ export const RadioButtonWrapper = styled.label`
padding-top: 5px;
padding-left: 40px;
padding-bottom: 5px;
span {
${(props) => props.disabled &&
css`
color: ${colors.get('disabled')};
text-decoration: line-through;
`
}
}
`;

export const RadioButtonInput = styled.input`
Expand Down

0 comments on commit e760e76

Please sign in to comment.