Skip to content

Commit

Permalink
Refactor checkbox styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaisa Korpela committed Feb 25, 2021
1 parent 92f22e8 commit 0c69367
Showing 1 changed file with 10 additions and 21 deletions.
31 changes: 10 additions & 21 deletions src/views/AcceptTasks/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@ const Group = ({ group }) => {
})
}

const CHECK_STYLE = {
float: 'right',
margin: 0,
width: '1.3rem',
height: '1.3rem',
}

return (
<StyledAcceptTasks>
<Content>
Expand Down Expand Up @@ -218,12 +225,7 @@ const Group = ({ group }) => {
id={group.id}
value="checkAll"
name="checkAll"
style={{
float: 'right',
margin: 0,
width: '1.3rem',
height: '1.3rem',
}}
style={CHECK_STYLE}
type="checkbox"
onChange={handleChange}
/>
Expand All @@ -239,24 +241,11 @@ const Group = ({ group }) => {
{member.name}
</label>
{isCompleted(member.tasks) ? (
<Check
style={{
float: 'right',
margin: 0,
width: '1.3rem',
height: '1.3rem',
color: 'green',
}}
/>
<Check style={{ ...CHECK_STYLE, color: 'green' }} />
) : (
<input
id={member.id}
style={{
float: 'right',
margin: 0,
width: '1.3rem',
height: '1.3rem',
}}
style={CHECK_STYLE}
type="checkbox"
value={member.id}
onChange={handleChange}
Expand Down

0 comments on commit 0c69367

Please sign in to comment.