Skip to content

Commit

Permalink
[web] Reduce the default icon size
Browse files Browse the repository at this point in the history
To make the section icons smaller by default, reducing the left gap
generated when using sections without icons.
  • Loading branch information
dgdavid committed Nov 28, 2023
1 parent c62976c commit 09961b8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions web/src/assets/styles/utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@
height: 24px;
}

.icon-size-28 {
width: 28px;
height: 28px;
}

.icon-size-32 {
width: 32px;
height: 32px;
Expand Down
2 changes: 1 addition & 1 deletion web/src/assets/styles/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
--gradient-border-start-color: var(--color-gray);
--gradient-border-end-color: transparent;

--icon-size-m: 32px;
--icon-size-m: 28px;

--header-block-size: auto;
--footer-block-size: auto;
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/core/Page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default function Page({
return (
<>
{ title && <Title>{title}</Title> }
{ icon && <PageIcon><Icon name={icon} /></PageIcon> }
{ icon && <PageIcon><Icon name={icon} size="32" /></PageIcon> }
<MainActions>
{ action ||
<Button size="lg" variant={actionVariant} onClick={pageAction}>
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/layout/Icon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const icons = {
* @param {object} [props.otherProps] Other props sent to SVG icon.
*
*/
export default function Icon({ name, className = "", size = 32, ...otherProps }) {
export default function Icon({ name, className = "", size = 28, ...otherProps }) {
if (!name) {
console.error(`Icon called without name. '${name}' given instead. Rendering nothing.`);
return null;
Expand Down

0 comments on commit 09961b8

Please sign in to comment.