mirror of
https://github.com/penpot/penpot.git
synced 2025-05-22 07:36:12 +02:00
📚 Add docs for RawSvg component
This commit is contained in:
parent
5309da2eee
commit
5d90c463a3
1 changed files with 28 additions and 0 deletions
28
frontend/src/app/main/ui/ds/foundations/raw_svg.mdx
Normal file
28
frontend/src/app/main/ui/ds/foundations/raw_svg.mdx
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
import { Canvas, Meta } from "@storybook/blocks";
|
||||||
|
import * as RawSvgStories from "./raw_svg.stories";
|
||||||
|
|
||||||
|
<Meta of={RawSvgStories} />
|
||||||
|
|
||||||
|
# SVG Assets
|
||||||
|
|
||||||
|
## Technical notes
|
||||||
|
|
||||||
|
There are some SVG assets that are not icons or cursors, and that are mostly
|
||||||
|
meant to be used as is (although depending on the context, some will be required
|
||||||
|
to be used with a specific color or size).
|
||||||
|
|
||||||
|
The assets are located in the `frontend/resources/images/assets` folder.
|
||||||
|
|
||||||
|
### Using asset IDs
|
||||||
|
|
||||||
|
For convenience, asset IDs are available in the component namespace.
|
||||||
|
|
||||||
|
```clj
|
||||||
|
(ns app.main.ui.foo
|
||||||
|
(:require
|
||||||
|
[app.main.ui.ds.foundations.raw-svg :as svg]))
|
||||||
|
```
|
||||||
|
|
||||||
|
```clj
|
||||||
|
[:> svg/svg-asset* {:asset svg/logo}]
|
||||||
|
```
|
Loading…
Add table
Add a link
Reference in a new issue