Skip to content

Commit

Permalink
Merge pull request #16 from ingresse/update/disabled-radio-button
Browse files Browse the repository at this point in the history
update: disabled radio button status
  • Loading branch information
udimberto authored Jul 24, 2020
2 parents 24a8e3a + e760e76 commit cf741db
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 cf741db

Please sign in to comment.