mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-15 21:37:43 +01:00
* Add useIconComponent, lucide-react * Add concept useIconComponent * add useIconComponents to packages * Add icon component * Add icon component * Add tests for react packages * Reset changes in icons * Add types * Add support for Icon components in Lucide Vue Next * update tests * Update tests * Enable Svelte component * Fix lucide-react-native tests * Update Solid package * update snapshots * Add docs * add docs * Update tests * Formatting * Formatting * Update package lock * Remove `useIconComponent` * Update guides * Update exports preact and solid package * Formatting * Format createIcons.ts * Add lucide lab repo link in docs
198 lines
3.2 KiB
Plaintext
198 lines
3.2 KiB
Plaintext
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
|
|
exports[`Using lucide icon components > should add a class to the element 1`] = `
|
|
<div>
|
|
<svg
|
|
class="lucide lucide-smile-icon my-icon"
|
|
fill="none"
|
|
height="24"
|
|
stroke="currentColor"
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
stroke-width="2"
|
|
viewBox="0 0 24 24"
|
|
width="24"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
>
|
|
<circle
|
|
cx="12"
|
|
cy="12"
|
|
r="10"
|
|
/>
|
|
<path
|
|
d="M8 14s1.5 2 4 2 4-2 4-2"
|
|
/>
|
|
<line
|
|
x1="9"
|
|
x2="9.01"
|
|
y1="9"
|
|
y2="9"
|
|
/>
|
|
<line
|
|
x1="15"
|
|
x2="15.01"
|
|
y1="9"
|
|
y2="9"
|
|
/>
|
|
</svg>
|
|
</div>
|
|
`;
|
|
|
|
exports[`Using lucide icon components > should add a style attribute to the element 1`] = `
|
|
<div>
|
|
<svg
|
|
class="lucide lucide-smile-icon"
|
|
fill="none"
|
|
height="24"
|
|
stroke="currentColor"
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
stroke-width="2"
|
|
style="position: absolute;"
|
|
viewBox="0 0 24 24"
|
|
width="24"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
>
|
|
<circle
|
|
cx="12"
|
|
cy="12"
|
|
r="10"
|
|
/>
|
|
<path
|
|
d="M8 14s1.5 2 4 2 4-2 4-2"
|
|
/>
|
|
<line
|
|
x1="9"
|
|
x2="9.01"
|
|
y1="9"
|
|
y2="9"
|
|
/>
|
|
<line
|
|
x1="15"
|
|
x2="15.01"
|
|
y1="9"
|
|
y2="9"
|
|
/>
|
|
</svg>
|
|
</div>
|
|
`;
|
|
|
|
exports[`Using lucide icon components > should adjust the size, stroke color and stroke width 1`] = `
|
|
<div>
|
|
<svg
|
|
class="lucide lucide-smile-icon"
|
|
fill="none"
|
|
height="48"
|
|
stroke="red"
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
stroke-width="4"
|
|
viewBox="0 0 24 24"
|
|
width="48"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
>
|
|
<circle
|
|
cx="12"
|
|
cy="12"
|
|
r="10"
|
|
/>
|
|
<path
|
|
d="M8 14s1.5 2 4 2 4-2 4-2"
|
|
/>
|
|
<line
|
|
x1="9"
|
|
x2="9.01"
|
|
y1="9"
|
|
y2="9"
|
|
/>
|
|
<line
|
|
x1="15"
|
|
x2="15.01"
|
|
y1="9"
|
|
y2="9"
|
|
/>
|
|
</svg>
|
|
</div>
|
|
`;
|
|
|
|
exports[`Using lucide icon components > should pass children to the icon slot 1`] = `
|
|
<div>
|
|
<svg
|
|
class="lucide lucide-smile-icon"
|
|
fill="none"
|
|
height="24"
|
|
stroke="currentColor"
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
stroke-width="2"
|
|
viewBox="0 0 24 24"
|
|
width="24"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
>
|
|
<circle
|
|
cx="12"
|
|
cy="12"
|
|
r="10"
|
|
/>
|
|
<path
|
|
d="M8 14s1.5 2 4 2 4-2 4-2"
|
|
/>
|
|
<line
|
|
x1="9"
|
|
x2="9.01"
|
|
y1="9"
|
|
y2="9"
|
|
/>
|
|
<line
|
|
x1="15"
|
|
x2="15.01"
|
|
y1="9"
|
|
y2="9"
|
|
/>
|
|
|
|
<text>
|
|
Hello World
|
|
</text>
|
|
|
|
</svg>
|
|
</div>
|
|
`;
|
|
|
|
exports[`Using lucide icon components > should render an component 1`] = `
|
|
<div>
|
|
<svg
|
|
class="lucide lucide-smile-icon"
|
|
fill="none"
|
|
height="24"
|
|
stroke="currentColor"
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
stroke-width="2"
|
|
viewBox="0 0 24 24"
|
|
width="24"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
>
|
|
<circle
|
|
cx="12"
|
|
cy="12"
|
|
r="10"
|
|
/>
|
|
<path
|
|
d="M8 14s1.5 2 4 2 4-2 4-2"
|
|
/>
|
|
<line
|
|
x1="9"
|
|
x2="9.01"
|
|
y1="9"
|
|
y2="9"
|
|
/>
|
|
<line
|
|
x1="15"
|
|
x2="15.01"
|
|
y1="9"
|
|
y2="9"
|
|
/>
|
|
</svg>
|
|
</div>
|
|
`;
|