Skip to content

Commit

Permalink
Merge pull request #1303 from undp/1300-radio-button-has-inconsistent…
Browse files Browse the repository at this point in the history
…-appearance

#1300 - abstracted common radio/checkbox styles
  • Loading branch information
Jura authored Oct 29, 2023
2 parents 82fb6ab + f29b86e commit 42a69d0
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion docs/css/base-minimal-no-grid.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/css/base-minimal.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/css/components/checkbox-radio-common.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/css/components/checkbox.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions stories/Components/Forms/Checkbox/Checkbox.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import './checkbox-radio-common.scss';
import './checkbox.scss';
import '../../../assets/scss/_typography.scss';

Expand Down
13 changes: 13 additions & 0 deletions stories/Components/Forms/Checkbox/checkbox-radio-common.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@import '../../../assets/scss/variables';

.form-check {
align-items: center;
display: flex;
position: relative;

label {
cursor: pointer;
font-size: $font-size-16;
padding: 0 7px;
}
}
12 changes: 0 additions & 12 deletions stories/Components/Forms/Checkbox/checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,6 @@
@import '../../../assets/scss/breakpoints';

/* checkbox */
.form-check {
align-items: center;
display: flex;
position: relative;

label {
cursor: pointer;
font-size: $font-size-16;
padding: 0 7px;
}
}

input[type='checkbox'] {
@extend %checbox-radio-before;

Expand Down
1 change: 1 addition & 0 deletions stories/Components/Forms/Radio/Radio.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import '../Checkbox/checkbox-radio-common.scss';
import './radio.scss';
import '../../../assets/scss/_typography.scss';

Expand Down
1 change: 1 addition & 0 deletions stories/assets/scss/_components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@
@import '../../Atom/Table/table';
// @import '../../Atom/Typography/Links/link';
@import '../../Atom/Video/video';
@import '../../Components/Forms/Checkbox/checkbox-radio-common';

0 comments on commit 42a69d0

Please sign in to comment.