Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adding section for selected icons from icon library #1589

Merged
merged 1 commit into from
Mar 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,44 @@ When using the `name` attribute, the component assumes there is an object with a
>
{category.items.map((item) => {
let markup = () => ({
__html: `<scale-icon-${category.category}-${item} accessibility-title="${item}" />`,
__html: `<scale-icon-${category.category}-${item} accessibility-title="${item}"/>`,
});
return (
<div key={item}>
<span>
<span style={{ color: '#7C7C7C' }}>{category.category}-</span>
{item}
</span>
<Canvas mdxSource={markup().__html}>
<span dangerouslySetInnerHTML={markup()}></span>
</Canvas>
</div>
);
})}
</div>
</div>
);
})}
</div>

### Full list of selected, grouped by category

<div style={{ marginTop: 16 }}>
{index.map((category) => {
return (
<div key={category.category}>
<h4>{category.label}</h4>
<div
style={{
display: 'grid',
gridTemplateColumns: 'repeat(auto-fill, minmax(240px, 1fr))',
gap: 16,
marginTop: 32,
}}
>
{category.items.map((item) => {
let markup = () => ({
__html: `<scale-icon-${category.category}-${item} accessibility-title="${item}" selected/>`,
});
return (
<div key={item}>
Expand Down