Skip to content

Commit 969c788

Browse files
committed
feat(demo-canvas-app): Add scalable icons demo
1 parent 5ccef55 commit 969c788

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

examples/demo-canvas-app/pages/index.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const menu = [
1212
{ href: '/test/components/tabs/', title: 'Tabs' },
1313
{ href: '/test/components/text-field/', title: 'TextField' },
1414
{ href: '/test/components/toast/', title: 'Toast' },
15+
{ href: '/test/components/icons/', title: 'Icons' },
1516
];
1617

1718
const StyledCard = styled.a`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { iconSet16, iconSet24, iconSet36, IconRootScalable } from '@sberdevices/plasma-icons';
2+
import { IconSetUnionSize } from '@sberdevices/plasma-icons/scalable/IconRoot';
3+
import { ParagraphText1 } from '@sberdevices/plasma-ui';
4+
5+
export default function IconsPage() {
6+
const iconSets = {
7+
...iconSet16,
8+
...iconSet24,
9+
...iconSet36,
10+
};
11+
12+
return (
13+
<>
14+
{Object.keys(iconSets).map((iconName) => (
15+
<div key={iconName} style={{ display: 'flex', alignItems: 'center' }}>
16+
<IconRootScalable size="s" iconName={iconName as IconSetUnionSize} color="inherit" />
17+
<ParagraphText1> - {iconName}</ParagraphText1>
18+
</div>
19+
))}
20+
</>
21+
);
22+
}
23+
24+
export function getStaticProps() {
25+
return {
26+
props: {
27+
title: 'Icons',
28+
back: true,
29+
},
30+
};
31+
}

packages/plasma-icons/src/index.ts

+5
Original file line numberDiff line numberDiff line change
@@ -170,3 +170,8 @@ export type { IconProps, IconSize } from './IconRoot';
170170

171171
export { Icon, iconSectionsSet } from './Icon';
172172
export type { IconName } from './Icon';
173+
174+
export { iconSet16 } from './scalable/Icon.assets.16';
175+
export { iconSet24 } from './scalable/Icon.assets.24';
176+
export { iconSet36 } from './scalable/Icon.assets.36';
177+
export { IconRoot as IconRootScalable } from './scalable';

0 commit comments

Comments
 (0)