This library is preact version of react-icons build to be use with deno fresh project.
All icons available can be test here click on the icon you want the copy the import statement to your code.
If you have time to help the project is here
deno add @preact-icons/ai
for deno
npx jsr add @preact-icons/ai
for npm
bunx jsr add @preact-icons/ai
for bun
replace http imports like:
{
"preact": "https://esm.sh/[email protected]",
"preact/": "https://esm.sh/[email protected]/",
}
by npm imports like:
{
"preact": "npm:[email protected]",
"preact/jsx-runtime": "npm:[email protected]/jsx-runtime",
"preact/hooks": "npm:[email protected]/hooks",
}
you can now import a single icon using:
import AiTwotonePrinter from "@preact-icons/ai/AiTwotonePrinter";
deno add @preact-icons/ai
import { AiFillAccountBook } from "@preact-icons/ai";
export default function TesSvg() {
return (<AiFillAccountBook />)
}
Check the full documetation in: here
the first sample:
import { FaBeer } from 'react-icons/fa';
class Question extends React.Component {
render() {
return <h3> Lets go for a <FaBeer />? </h3>
}
}
can be convert as:
import { FaBeer } from '@preact-icons/fa';
// or
import FaBeer from '@preact-icons/fa/FaBeer';
import { Component } from 'preact'
class Question extends Component {
render() {
return <h3> Lets go for a <FaBeer />? </h3>
}
}
- Original react-icons npm package.
- The React Icons doc