Skip to content

Commit

Permalink
chore: Minor docs tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Dec 24, 2024
1 parent c90836d commit 3c69cd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions crates/freya/src/_docs/introduction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! It uses a model where you compose the app by splitting the UI in different components that return pieces of UI or call other components, this is because
//! Freya runs on 🧬 [Dioxus](https://dioxuslabs.com), a renderer-agnostic UI library inspired by ReactJS.
//!
//! Even though you might have seen that Dioxus renders to HTML, that it uses WASM, or that it uses CSS. this does not apply to Freya. In fact, Freya only uses some of the core
//! Even though you might have seen that Dioxus render to HTML, use CSS/JavaScript/WASM/WebView/WGPU. this does not apply to Freya. In fact, Freya only uses some of the core
//! crates of Dioxus, which means that you will be writing Dioxus components and using some of its APIs but, the elements, attributes, styling, layout, events, and more things
//! will be provided by Freya.
//!
Expand All @@ -32,7 +32,7 @@
//! background: "rgb(35, 35, 35)",
//! color: "white",
//! padding: "12",
//! onclick: move |_| count += 1, // **Update** the state
//! onclick: move |_| count += 1, // **Update** the state on click events
//! label { "Click to increase -> {count}" } // Display the **state**
//! }
//! )
Expand Down
6 changes: 2 additions & 4 deletions crates/freya/src/_docs/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
//!
//! ```rust, no_run
//! # use freya::prelude::*;
//!
//! # { rsx!(
//! // Element, always in lower case
//! rect {
Expand Down Expand Up @@ -86,7 +85,7 @@
//! # };
//! ```
//!
//! Or just use if, for-loops, etc.. Inside of the RSX:
//! Or just use if, for-loops, etc... inside of the RSX:
//!
//! ```rust, no_run
//! # use freya::prelude::*;
Expand All @@ -103,8 +102,7 @@
//! "Value -> {i}"
//! }
//! }
//! // When this condition is not met the inner element will
//! // simply not be rendered
//! // When this condition is not met the inner element will simply not be rendered
//! if show_text {
//! label {
//! "Hello, World!"
Expand Down

0 comments on commit 3c69cd1

Please sign in to comment.