Skip to content

Commit 2362899

Browse files
authored
chore: adjusts ChevronIcon styling to match other icons (#12133)
### What? Adjusts the `ChevronIcon` component to match the sizing of other icons in the `ui` package. Also adds various styling adjustments to places where icons are used. ### Why? Using the `ChevronIcon` in other elements currently requires different styling to make it consistent with other icons. This will make it so that any usage of the any icons is consistent across components. ### How? Resizes the `ChevronIcon` components and updates styling throughout the admin panel.
1 parent b9832f4 commit 2362899

File tree

12 files changed

+15
-29
lines changed

12 files changed

+15
-29
lines changed

packages/next/src/views/LivePreview/Toolbar/Controls/index.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export const ToolbarControls: React.FC<EditViewProps> = () => {
3131
<span>
3232
{breakpoints.find((bp) => bp.name == breakpoint)?.label ?? customOption.label}
3333
</span>
34-
&nbsp;
3534
<ChevronIcon className={`${baseClass}__chevron`} />
3635
</React.Fragment>
3736
}
@@ -82,7 +81,6 @@ export const ToolbarControls: React.FC<EditViewProps> = () => {
8281
button={
8382
<React.Fragment>
8483
<span>{zoom * 100}%</span>
85-
&nbsp;
8684
<ChevronIcon className={`${baseClass}__chevron`} />
8785
</React.Fragment>
8886
}

packages/ui/src/elements/BulkUpload/ActionsBar/index.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@
3333
width: calc(var(--base) * 1.2);
3434
height: calc(var(--base) * 1.2);
3535

36-
svg {
37-
max-width: 1rem;
38-
}
39-
4036
&:hover {
4137
background-color: var(--theme-elevation-200);
4238
}

packages/ui/src/elements/Button/index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
}
77

88
.btn--withPopup {
9-
margin-block: 24px;
9+
margin-block: 4px;
1010
.btn {
1111
margin: 0;
1212
}

packages/ui/src/elements/Localizer/LocalizerLabel/index.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
white-space: nowrap;
88
display: flex;
99
padding-inline-start: base(0.4);
10-
padding-inline-end: base(0.4);
10+
padding-inline-end: base(0.2);
1111
background-color: var(--theme-elevation-100);
1212
border-radius: var(--style-radius-s);
1313

@@ -24,7 +24,6 @@
2424
&__current {
2525
display: flex;
2626
align-items: center;
27-
gap: base(0.3);
2827
}
2928

3029
button {

packages/ui/src/elements/Localizer/LocalizerLabel/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const LocalizerLabel: React.FC<{
2828
<span className={`${baseClass}__current-label`}>
2929
{`${getTranslation(locale.label, i18n)}`}
3030
</span>
31-
<ChevronIcon className={`${baseClass}__chevron`} size="small" />
31+
<ChevronIcon className={`${baseClass}__chevron`} />
3232
</div>
3333
</div>
3434
)

packages/ui/src/elements/PerPage/index.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@
3636
}
3737
}
3838

39-
&__chevron {
40-
padding-left: calc(var(--base) / 4);
41-
}
42-
4339
&__button-active {
4440
font-weight: bold;
4541
color: var(--theme-text);

packages/ui/src/elements/Pill/index.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@
5555
}
5656

5757
&--has-icon {
58+
gap: 0;
5859
padding-inline-start: base(0.4);
59-
padding-inline-end: base(0.3);
60+
padding-inline-end: base(0.1);
6061

6162
svg {
6263
display: block;

packages/ui/src/elements/Popup/PopupTrigger/index.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
}
1818

1919
&--size-small {
20-
padding: base(0.4);
20+
padding: base(0.2);
2121
}
2222

2323
&--size-medium {
24-
padding: base(0.6);
24+
padding: base(0.3);
2525
}
2626

2727
&--size-large {
28-
padding: base(0.8);
28+
padding: base(0.4);
2929
}
3030

3131
&--disabled {

packages/ui/src/elements/ReactSelect/index.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
padding: base(0.5) base(0.6);
1818
}
1919

20-
.rs__indicators {
21-
gap: calc(var(--base) / 4);
22-
}
23-
2420
.rs__indicator {
2521
padding: 0px 4px;
2622
cursor: pointer;

packages/ui/src/elements/SortColumn/index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
&__button {
3232
margin: 0;
3333
opacity: 0.3;
34-
padding: calc(var(--base) / 4);
34+
padding: calc(var(--base) / 4) 0;
3535
display: inline-flex;
3636
align-items: center;
3737
justify-content: center;

0 commit comments

Comments
 (0)