Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl IconConst {
#[allow(non_upper_case_globals)]
pub const {}: IconData = IconData {{
name: \"{}\",
body: r#\"{}\"#,
body: r###\"{}\"###,
Comment thread
sonicjhon1 marked this conversation as resolved.
view_box: \"{}\",
width: \"{}\",
height: \"{}\",
Expand Down
5 changes: 4 additions & 1 deletion tests/cli_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ fn test_generated_code_compiles() -> Result<()> {
.arg("mdi:home")
.arg("heroicons:arrow-left")
.arg("lucide:settings")
.arg("logos:chrome")
.arg("--output")
.arg(&icons_dir)
.assert()
Expand All @@ -273,13 +274,14 @@ mod icons;

use dioxus::prelude::*;
use icons::Icon;
use icons::{heroicons, lucide, mdi};
use icons::{heroicons, lucide, logos, mdi};

fn main() {
// Use the icons to avoid dead_code warnings
let _home = mdi::Home;
let _arrow = heroicons::ArrowLeft;
let _settings = lucide::Settings;
let _chrome = logos::Chrome;

println!("Icons loaded successfully");
}
Expand All @@ -291,6 +293,7 @@ fn App() -> Element {
Icon { data: mdi::Home }
Icon { data: heroicons::ArrowLeft }
Icon { data: lucide::Settings, width: "32", height: "32" }
Icon { data: logos::Chrome }
Icon { data: mdi::Home, size: "24" }
Icon { data: heroicons::ArrowLeft, size: 32.to_string() }
Icon { data: lucide::Settings, size: "2em" }
Expand Down