-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revamp Color Theme and Docs/Features (#38)
* feat: debounce * fix: fmt * revision: debounce * fix: clippy * revision: docs, compile errors * revision: debounce * fix: fmt * revision: use clone * revision: remove clone * revision: formatting * revision: manually partialeq * progress: stuff Saving progress as there is a tornado-capable storm coming * revision: docs, clippy, etc * fix: example, features * remove: old code * revision: listening * fix: doc reference * revision: add partialeq * revision: change target cfgs * update: dioxus-signals * fix: window_size * fix: readme typo * fix: signal life
- Loading branch information
Showing
30 changed files
with
377 additions
and
236 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
use dioxus::prelude::*; | ||
use dioxus_router::prelude::*; | ||
use dioxus_sdk::storage::*; | ||
|
||
fn main() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[package] | ||
name = "color_scheme" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
dioxus-sdk = { workspace = true, features = ["system_theme"] } | ||
dioxus = { workspace = true } | ||
|
||
[features] | ||
web = ["dioxus/web"] | ||
desktop = ["dioxus/desktop"] |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
use dioxus::prelude::*; | ||
use dioxus_sdk::theme::use_system_theme; | ||
|
||
fn main() { | ||
launch(App); | ||
} | ||
|
||
#[component] | ||
fn App() -> Element { | ||
let theme = use_system_theme(); | ||
|
||
let theme_text = match theme() { | ||
Ok(theme) => rsx! { h3 { "Your system theme is {theme}." } }, | ||
Err(err) => rsx! { h3 {"Error getting system theme: {err:?}" } }, | ||
}; | ||
|
||
rsx!( | ||
div { | ||
style: "text-align: center;", | ||
h1 { "🌗 Dioxus 🚀" } | ||
{theme_text} | ||
} | ||
|
||
Other {} | ||
) | ||
} | ||
|
||
#[component] | ||
fn Other() -> Element { | ||
let theme = use_system_theme(); | ||
|
||
let theme_text = match theme() { | ||
Ok(theme) => rsx! { h3 { "Your system theme x2 is {theme}." } }, | ||
Err(err) => rsx! { h3 {"Error getting system theme: {err:?}" } }, | ||
}; | ||
|
||
rsx!( | ||
div { | ||
style: "text-align: center;", | ||
{theme_text} | ||
} | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
//! Interact with the clipboard. | ||
|
||
cfg_if::cfg_if! { | ||
if #[cfg(not(target_family = "wasm"))] { | ||
mod use_clipboard; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.