Skip to content

pantoken-root / renderers/svelte/src / icon

Swyddogaeth: icon() ​

icon(node, name): ActionResult

Arbrofol

Gweithred Svelte: <span use:icon={"arrow-left"} /> yn rendro SVG mewnlinol yr eicon i'r nod.

Paramedrau ​

node ​

Element

Yr elfen gwesteiwr.

name ​

string

Enw'r eicon.

Yn dychwelyd ​

ActionResult

Enghraifft ​

svelte
<script>
  import { icon } from "@pantoken/svelte";
  import "@pantoken/css";
</script>

<span use:icon={"arrow-left"} />