Skip to content

Commit

Permalink
Merge branch 'main' into Issue-94
Browse files Browse the repository at this point in the history
  • Loading branch information
DominMFD authored May 17, 2024
2 parents ce8a60d + da86a42 commit 2cf8f3d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 24 deletions.
8 changes: 3 additions & 5 deletions src/components/Checkbox/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,21 @@
height: 2.2rem;

margin: 0.8rem;
border: 0.2rem solid colors.$gray500;
border: 2px solid colors.$gray250;

border-radius: 0.5rem;

cursor: pointer;
appearance: none;

&:checked {
border-color: colors.$primary500;
border-color: colors.$primary200;

background: colors.$primary500 url('./images/check.svg') no-repeat center
background: colors.$primary200 url('./images/check.svg') no-repeat center
center/70%;
}

&:disabled {
border-color: colors.$gray500;

cursor: not-allowed;
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/components/RadioButton/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ export default function RadioButton({
this.setValue(value);
this.setName(name);
this.setDisabled(disabled);

const $radioButton = this.selected.get('radio-button');

$radioButton.addEventListener('change', (e) => {
this.setChecked(e.target.checked);
this.setCheck(e.target.checked);
});
}

Expand Down
28 changes: 11 additions & 17 deletions src/components/RadioButton/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,29 @@

align-items: center;

color: colors.$gray600;

padding: 1rem 8rem 1rem 1rem;
border: 0.15rem solid colors.$gray600;
border: 0.15rem solid colors.$gray200;

border-radius: 2rem;
border-radius: 1.5rem;

transition: border-color 0.3s;

cursor: pointer;

&:focus-within {
border-color: colors.$primary200;
&:has(&__input:checked) {
color: colors.$primary200;

.radio-dot {
color: colors.$primary200;
}
border-color: colors.$primary200;
}

&__input {
width: 2.2rem;
height: 2.2rem;
width: 1.6rem;
height: 1.6rem;

margin: 0.8rem;
border: 0.15rem solid colors.$gray600;
border-color: colors.$primary200;
border: 1px solid colors.$gray200;

border-radius: 50%;

Expand All @@ -39,23 +38,18 @@
&:checked {
border-color: colors.$primary200;

background: url('./images/ellipse.svg') no-repeat center center/60%;
background: url('./images/ellipse.svg') no-repeat center center/70% 70%;
}

&:disabled {
border-color: colors.$gray200;

cursor: not-allowed;

+ .checkmark {
color: colors.$gray200;
}
}
}

&__dot {
font-family: fonts.$primaryFont;
color: colors.$gray600;
font-size: fonts.$xs;
}
}
1 change: 1 addition & 0 deletions src/styles/colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ $error100: rgb(179, 38, 30);
$gray100: rgb(236, 239, 242);
$gray150: rgb(236, 239, 242);
$gray200: rgb(224, 224, 224);
$gray250: rgb(172, 172, 181);
$gray300: rgb(179, 190, 205);
$gray400: rgb(141, 141, 141);
$gray500: rgb(96, 104, 115);
Expand Down

0 comments on commit 2cf8f3d

Please sign in to comment.