Skip to content

Commit

Permalink
Merge branch 'main' into 1200-style-add-correct-dark-theme-colors-to-…
Browse files Browse the repository at this point in the history
…input
  • Loading branch information
larissa-kamily-brisa authored Nov 27, 2024
2 parents 75983c4 + cd17824 commit 946b994
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 2 deletions.
2 changes: 2 additions & 0 deletions projects/ion/src/lib/dropdown/_dropdown.theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ $default: (
background-color: ion-theme(neutral-1),
shadow: '0px 8px 6px -4px rgba(0, 0, 0, 0.15), 0 0 2px rgba(0, 0, 0, 0.15)',
border-radius: 8px,
border-color: ion-theme(neutral-1),
text: (
font-family: ion-theme(font-family-main),
font-style: normal,
Expand Down Expand Up @@ -69,6 +70,7 @@ $dark: (
background-color: ion-theme(neutral-5),
shadow-color: rgba(4, 42, 98, 0.15),
border-radius: 8px,
border-color: ion-theme(neutral-3),
text: (
font-family: ion-theme(font-family-main),
font-style: normal,
Expand Down
1 change: 1 addition & 0 deletions projects/ion/src/lib/dropdown/dropdown.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
background-color: ion-theme(dropdown-background-color);
box-shadow: ion-theme(dropdown-shadow);
border-radius: ion-theme(dropdown-border-radius);
border: 1px solid ion-theme(dropdown-border-color) !important;

&--loading {
flex-direction: row;
Expand Down
42 changes: 42 additions & 0 deletions projects/ion/src/lib/select/_select.theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ $default: (
border-radius: 8px,
border-color: ion-theme(neutral-5),
hover-border-color: ion-theme(primary-4),
icon-color: ion-theme(neutral-7),
text-color: ion-theme(neutral-7),
active: (
border-color: ion-theme(primary-4),
shadow-color: ion-theme(primary-2),
Expand Down Expand Up @@ -37,9 +39,49 @@ $default: (
),
);

$dark: (
background-color: ion-theme(neutral-5),
border-radius: 8px,
border-color: ion-theme(neutral-3),
hover-border-color: ion-theme(primary-4),
icon-color: ion-theme(neutral-3),
text-color: ion-theme(neutral-3),
active: (
border-color: ion-theme(primary-4),
shadow-color: ion-theme(primary-2),
),
disabled: (
background-color: ion-theme(neutral-7),
border-color: ion-theme(neutral-4),
placeholder-color: ion-theme(neutral-4),
icon-color: ion-theme(neutral-4),
),
required: (
border-color: ion-theme(negative-6),
icon-color: ion-theme(negative-6),
hover-border-color: ion-theme(negative-6),
focus: (
shadow-color: ion-theme(negative-6),
border-color: ion-theme(negative-6),
),
),
item: (
text-color: ion-theme(neutral-1),
background-color: ion-theme(neutral-6),
icon-color: ion-theme(neutral-1),
hover-icon-color: ion-theme(primary-3),
disabled: (
background-color: ion-theme(neutral-5),
text-color: ion-theme(neutral-3),
border-color: ion-theme(neutral-5),
),
),
);

@include register-component(
select,
(
default: $default,
dark: $dark,
)
);
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
padding: 4px;
color: ion-theme(select-item-text-color);
background-color: ion-theme(select-item-background-color);
border-radius: 4px;
border-radius: 100px;
font-size: 14px;
cursor: default;

Expand Down
6 changes: 5 additions & 1 deletion projects/ion/src/lib/select/select.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@
<ion-icon
class="icon"
[type]="showDropdown ? 'semi-up' : 'semi-down'"
[color]="!isValid ? 'var(--ion-neutral-6)' : 'var(--ion-negative-6)'"
[color]="
!isValid
? 'var(--ion-select-icon-color)'
: 'var(--ion-select-required-icon-color)'
"
></ion-icon>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions projects/ion/src/lib/select/select.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
border: none;
outline: none;
width: 100%;
color: ion-theme(select-text-color);
}

input {
Expand Down

0 comments on commit 946b994

Please sign in to comment.