Skip to content

Commit b550f49

Browse files
authored
fix: Set highlighted class to Sidebar.Item.Icon (#433)
1 parent c92386f commit b550f49

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

packages/fuselage/src/components/Sidebar/Item.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,16 @@ const Wrapper = ({ className, ...props }) => (
8686
/>
8787
);
8888

89-
const Icon = ({ children, ...props }) => (
90-
<div className='rc-box rcx-box--full rcx-sidebar-item__icon' {...props}>
89+
const Icon = ({ highlighted, children, className, ...props }) => (
90+
<div
91+
className={[
92+
'rc-box rcx-box--full rcx-sidebar-item__icon',
93+
highlighted && 'rcx-sidebar-item__icon--highlighted',
94+
]
95+
.filter(Boolean)
96+
.join(' ')}
97+
{...props}
98+
>
9199
{children || <FuselageIcon size='x16' {...props} />}
92100
</div>
93101
);

packages/fuselage/src/components/Sidebar/styles.scss

+2
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ $sidebar-item-color-selected: theme(
146146

147147
&__icon {
148148
@include typography.use-with-truncated-text();
149+
@include highlighted;
150+
149151
display: flex;
150152
justify-content: center;
151153

0 commit comments

Comments
 (0)