From 6079efb68b0632757994bcfe96e0bacc60b47cb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABlle=20Huisman?= Date: Sat, 17 May 2025 01:13:08 +0200 Subject: [PATCH] docs: add category features and class/style props (#81) --- .pre-commit-config.yaml | 2 +- book/src/frameworks/dioxus.md | 28 +++++++++++++++++----------- book/src/frameworks/leptos.md | 12 ++++++++---- book/src/frameworks/yew.md | 28 +++++++++++++++++----------- package.json | 2 +- 5 files changed, 44 insertions(+), 28 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d6c2618..380d3bf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: hooks: - id: prettier additional_dependencies: - - prettier@^3.3.3 + - prettier@^3.5.3 - repo: https://github.com/doublify/pre-commit-rust rev: v1.0 hooks: diff --git a/book/src/frameworks/dioxus.md b/book/src/frameworks/dioxus.md index 25e1754..dc30705 100644 --- a/book/src/frameworks/dioxus.md +++ b/book/src/frameworks/dioxus.md @@ -5,12 +5,16 @@ Implementation of the Lucide icon library for [Dioxus](https://dioxuslabs.com/) ## Installation ```shell -cargo add lucide-dioxus +# Selective categories (see https://lucide.dev/icons/categories) +cargo add lucide-dioxus --features accessibility,communication + +# All categories +cargo add lucide-dioxus --features all-icons ``` -- [View on crates.io](https://crates.io/crates/lucide-dioxus) -- [View on docs.rs](https://docs.rs/lucide-dioxus/latest/lucide_dioxus/) -- [View source](https://github.com/RustForWeb/lucide/tree/main/packages/dioxus) +- [View on crates.io](https://crates.io/crates/lucide-dioxus) +- [View on docs.rs](https://docs.rs/lucide-dioxus/latest/lucide_dioxus/) +- [View source](https://github.com/RustForWeb/lucide/tree/main/packages/dioxus) ## Usage @@ -31,13 +35,15 @@ fn App() -> Element { ## Props -| Name | Type | Default | -| ----------------------- | -------- | ---------------- | -| `size` | `usize` | `24` | -| `color` | `String` | `"currentColor"` | -| `fill` | `String` | `"none"` | -| `stroke_width` | `usize` | `2` | -| `absolute_stroke_width` | `bool` | `false` | +| Name | Type | Default | +| ----------------------- | ---------------- | ---------------- | +| `size` | `usize` | `24` | +| `color` | `String` | `"currentColor"` | +| `fill` | `String` | `"none"` | +| `stroke_width` | `usize` | `2` | +| `absolute_stroke_width` | `bool` | `false` | +| `class` | `Option` | - | +| `style` | `Option` | - | ## Icons diff --git a/book/src/frameworks/leptos.md b/book/src/frameworks/leptos.md index 8d488fc..33c969d 100644 --- a/book/src/frameworks/leptos.md +++ b/book/src/frameworks/leptos.md @@ -7,12 +7,16 @@ Implementation of the Lucide icon library for [Leptos](https://leptos.dev/) appl Install the icons from your command line. ```shell -cargo add lucide-leptos +# Selective categories (see https://lucide.dev/icons/categories) +cargo add lucide-leptos --features accessibility,communication + +# All categories +cargo add lucide-leptos --features all-icons ``` -- [View on crates.io](https://crates.io/crates/lucide-leptos) -- [View on docs.rs](https://docs.rs/lucide-leptos/latest/lucide_leptos/) -- [View source](https://github.com/RustForWeb/lucide/tree/main/packages/leptos) +- [View on crates.io](https://crates.io/crates/lucide-leptos) +- [View on docs.rs](https://docs.rs/lucide-leptos/latest/lucide_leptos/) +- [View source](https://github.com/RustForWeb/lucide/tree/main/packages/leptos) ## Usage diff --git a/book/src/frameworks/yew.md b/book/src/frameworks/yew.md index eaa197c..e4dad14 100644 --- a/book/src/frameworks/yew.md +++ b/book/src/frameworks/yew.md @@ -7,12 +7,16 @@ Implementation of the Lucide icon library for [Yew](https://yew.rs/) application Install the icons from your command line. ```shell -cargo add lucide-yew +# Selective categories (see https://lucide.dev/icons/categories) +cargo add lucide-yew --features accessibility,communication + +# All categories +cargo add lucide-yew --features all-icons ``` -- [View on crates.io](https://crates.io/crates/lucide-yew) -- [View on docs.rs](https://docs.rs/lucide-yew/latest/lucide_yew/) -- [View source](https://github.com/RustForWeb/lucide/tree/main/packages/yew) +- [View on crates.io](https://crates.io/crates/lucide-yew) +- [View on docs.rs](https://docs.rs/lucide-yew/latest/lucide_yew/) +- [View source](https://github.com/RustForWeb/lucide/tree/main/packages/yew) ## Usage @@ -30,13 +34,15 @@ fn App() -> Html { ## Props -| Name | Type | Default | -| ----------------------- | -------- | ---------------- | -| `size` | `usize` | `24` | -| `color` | `String` | `"currentColor"` | -| `fill` | `String` | `"none"` | -| `stroke_width` | `usize` | `2` | -| `absolute_stroke_width` | `bool` | `false` | +| Name | Type | Default | +| ----------------------- | ------------------- | ---------------- | +| `size` | `usize` | `24` | +| `color` | `AttrValue` | `"currentColor"` | +| `fill` | `AttrValue` | `"none"` | +| `stroke_width` | `usize` | `2` | +| `absolute_stroke_width` | `bool` | `false` | +| `class` | `Classes` | - | +| `style` | `Option` | - | ## Icons diff --git a/package.json b/package.json index 5847433..41be42d 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "private": true, "scripts": {}, "devDependencies": { - "prettier": "^3.3.3", + "prettier": "^3.5.3", "tailwindcss": "^3.4.17" }, "engines": {