Skip to content

Commit db24f01

Browse files
authored
Merge pull request #8291 from sameerkrdev/fix/sistent-icons-usage-8257
[Sistent] Fix icon imports and render real icons in Working with Icons preview
2 parents 970640b + 51672c6 commit db24f01

2 files changed

Lines changed: 29 additions & 25 deletions

File tree

‎src/sections/Projects/Sistent/getting-started/usage/index.js‎

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ import {
1414
CardContent,
1515
Typography,
1616
Alert,
17+
IconButton,
18+
SearchIcon,
19+
MenuIcon,
20+
DownloadIcon,
21+
FavoriteIcon,
1722
} from "@sistent/sistent";
1823

1924
const contents = [
@@ -230,15 +235,12 @@ import * as Sistent from "@sistent/sistent";`,
230235

231236
iconUsage: `import {
232237
Button,
233-
IconButton,
238+
IconButton,
234239
Stack,
235-
Tooltip
236-
} from "@sistent/sistent";
237-
import {
238-
Search as SearchIcon,
239-
Menu as MenuIcon,
240-
Download as DownloadIcon,
241-
Favorite as FavoriteIcon
240+
SearchIcon,
241+
MenuIcon,
242+
DownloadIcon,
243+
FavoriteIcon
242244
} from "@sistent/sistent";
243245
244246
function IconExamples() {
@@ -261,17 +263,13 @@ function IconExamples() {
261263
</Button>
262264
263265
{/* Icon-only buttons */}
264-
<Tooltip title="Menu">
265-
<IconButton aria-label="menu" size="large">
266-
<MenuIcon />
267-
</IconButton>
268-
</Tooltip>
269-
270-
<Tooltip title="Add to favorites">
271-
<IconButton aria-label="favorite" color="secondary">
272-
<FavoriteIcon />
273-
</IconButton>
274-
</Tooltip>
266+
<IconButton aria-label="menu" size="large">
267+
<MenuIcon />
268+
</IconButton>
269+
270+
<IconButton aria-label="favorite" color="secondary">
271+
<FavoriteIcon />
272+
</IconButton>
275273
</Stack>
276274
);
277275
}`,
@@ -628,23 +626,26 @@ const SistentUsage = () => {
628626
initialMode={isDark ? "dark" : "light"}
629627
>
630628
<div
629+
className="icon-showcase"
631630
style={{
632631
display: "flex",
633632
gap: "12px",
634633
alignItems: "center",
635634
flexWrap: "wrap",
636635
}}
637636
>
638-
<Button startIcon="🔍" variant="contained">
637+
<Button startIcon={<SearchIcon />} variant="contained">
639638
Search
640639
</Button>
641-
<Button endIcon="📥" variant="outlined">
640+
<Button endIcon={<DownloadIcon />} variant="outlined">
642641
Download
643642
</Button>
644-
<Button variant="text">Menu ☰</Button>
645-
<Button variant="contained" color="secondary">
646-
❤️
647-
</Button>
643+
<IconButton aria-label="menu" size="large">
644+
<MenuIcon />
645+
</IconButton>
646+
<IconButton aria-label="favorite" color="secondary">
647+
<FavoriteIcon />
648+
</IconButton>
648649
</div>
649650
</SistentThemeProvider>
650651
</div>

‎src/sections/Projects/Sistent/sistent.style.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,9 @@ const SistentWrapper = styled.div`
242242
stroke: ${(props) => props.theme.green00D3A9ToGreen00B39F};
243243
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
244244
}
245+
.icon-showcase path {
246+
stroke: none;
247+
}
245248
svg {
246249
color: "red";
247250
}

0 commit comments

Comments
 (0)