Skip to content

Commit acb59be

Browse files
committed
docs: iconbase
1 parent b08da6e commit acb59be

File tree

1 file changed

+10
-80
lines changed

1 file changed

+10
-80
lines changed

apps/docs/content/_components/iconbase.md

Lines changed: 10 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,13 @@
66

77
Storefront UI ships with a default set of icons available with the naming convention `SfIcon{Name}`. Each icon is a component that extends the `SfIconBase` component.
88

9-
## List of icons
9+
<!-- ## List of icons
1010
1111
List of all icons shipped with Storefront UI below. Click on any of the icons to copy its name.
1212
1313
<Showcase showcase-name="IconBase/ListOfIcons" allow="clipboard-write">
1414
15-
::vue-only
16-
<<<../../../preview/nuxt/pages/showcases/IconBase/ListOfIcons.vue
17-
::
18-
::react-only
19-
<<<../../../preview/next/pages/showcases/IconBase/ListOfIcons.tsx
20-
::
21-
::qwik-only
22-
<<<../../../website/src/routes/showcases/IconBase/ListOfIcons/index.tsx
23-
::
15+
<<<../../../website/src/routes/showcases/IconBase/ListOfIcons/index.tsx -->
2416

2517
</Showcase>
2618

@@ -32,15 +24,7 @@ All Icon components supports various sizes that can be set with the `size` prop:
3224

3325
<Showcase showcase-name="IconBase/IconBaseSizes" style="min-height:300px">
3426

35-
::vue-only
36-
<<<../../../preview/nuxt/pages/showcases/IconBase/IconBaseSizes.vue
37-
::
38-
::react-only
39-
<<<../../../preview/next/pages/showcases/IconBase/IconBaseSizes.tsx
40-
::
41-
::qwik-only
4227
<<<../../../website/src/routes/showcases/IconBase/IconBaseSizes/index.tsx
43-
::
4428

4529
</Showcase>
4630

@@ -50,98 +34,44 @@ All Icon components inherit the current text color using Tailwind's [`fill-curre
5034

5135
<Showcase showcase-name="IconBase/IconBaseColors">
5236

53-
::vue-only
54-
<<<../../../preview/nuxt/pages/showcases/IconBase/IconBaseColors.vue
55-
::
56-
::react-only
57-
<<<../../../preview/next/pages/showcases/IconBase/IconBaseColors.tsx
58-
::
59-
::qwik-only
6037
<<<../../../website/src/routes/showcases/IconBase/IconBaseColors/index.tsx
61-
::
6238

6339
</Showcase>
6440

6541
### Custom icon
6642

6743
The `SfIconBase` component supports displaying of a custom SVG icon.
6844

69-
::vue-only
7045
You can pass SVG content either via `content` prop or as a default slot.
71-
::
72-
::react-only
73-
You can pass SVG content as children.
74-
::
75-
::qwik-only
76-
You can pass SVG content as children.
77-
::
7846

7947
If you're using a custom icon, you need to specify either the `viewBox` or `width`/`height` attributes for the SVG to render correctly.
8048

8149
<Showcase showcase-name="IconBase/CustomIcon">
8250

83-
::vue-only
84-
<<<../../../preview/nuxt/pages/showcases/IconBase/CustomIcon.vue
85-
::
86-
::react-only
87-
<<<../../../preview/next/pages/showcases/IconBase/CustomIcon.tsx
88-
::
89-
::qwik-only
9051
<<<../../../website/src/routes/showcases/IconBase/CustomIcon/index.tsx
91-
::
9252

9353
</Showcase>
9454

9555
## Notes
9656

9757
Storefront UI icons are generated with use of [`createIcons.js`](https://github.com/vuestorefront/storefront-ui/blob/v2/createIcons.js) script and they are based on `IconBase` component.
9858

99-
## Accessibility notes
59+
<!-- ## Accessibility notes
10060
101-
When using an Icon without any additional label and/or description, you should specify an `aria-label` on the icon component.
61+
When using an Icon without any additional label and/or description, you should specify an `aria-label` on the icon component. -->
10262

10363
## Playground
10464

10565
<Generate style="height: 380px" />
10666

10767
#tab-2
10868

109-
::vue-only
110-
| Prop name | Type | Default value | Possible values |
111-
|----------------|----------------------------------------|---------------|-----------------|
112-
| `size` | `SfIconSize` | `'base'` | `'xs'`, `'sm'`, `'base'`, `'lg'`, `'xl'`, `'2xl'`, `'3xl'` |
113-
| `content` | `string` | | Content of and SVG, e.g. `<path d='...'/>` |
114-
::
115-
::react-only
116-
| Prop name | Type | Default value | Possible values |
117-
|----------------|----------------------------------------|---------------|-----------------|
118-
| `size` | `SfIconSize` | `'base'` | `'xs'`, `'sm'`, `'base'`, `'lg'`, `'xl'`, `'2xl'`, `'3xl'` |
119-
| `children` | `ReactNode` | | Content of an SVG, e.g. `<path d='...'/>` |
120-
::
121-
::qwik-only
122-
| Prop name | Type | Default value | Possible values |
123-
|----------------|----------------------------------------|---------------|-----------------|
124-
| `size` | `SfIconSize` | `'base'` | `'xs'`, `'sm'`, `'base'`, `'lg'`, `'xl'`, `'2xl'`, `'3xl'` |
125-
| `children` | `ReactNode` | | Content of an SVG, e.g. `<path d='...'/>` |
126-
::
127-
::vue-only
69+
| Prop name | Type | Default value | Possible values |
70+
| --------- | ------------ | ------------- | ------------------------------------------------------------------- |
71+
| `size` | `SfIconSize` | `'base'` | `'xs'`, `'sm'`, `'base'`, `'lg'`, `'xl'`, `'2xl'`, `'3xl'`, `'4xl'` |
12872

12973
## Slots
13074

131-
| Slot name | Description |
132-
| --------- | ------------------------------------------------------------------------------- |
133-
| `default` | Content of an SVF, e.g. `<path d='...'/>`. Takes precedence over `content` prop |
134-
135-
::
136-
#tab-3
137-
::vue-only
138-
<<<../../../../packages/sfui/frameworks/vue/components/SfIconBase/SfIconBase.vue
139-
::
140-
::react-only
141-
<<< ../../../../packages/sfui/frameworks/react/components/SfIconBase/SfIconBase.tsx
142-
::
143-
::qwik-only
144-
<<<../../../../dist/packages/qwik-storefront-ui/components/SfIconBase/SfIconBase.tsx
145-
::
146-
147-
::
75+
| Slot name | Description |
76+
| --------- | ------------------------------------------ |
77+
| `default` | Content of an SVG, e.g. `<path d='...'/>`. |

0 commit comments

Comments
 (0)