-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/sidebar-component
- Loading branch information
Showing
46 changed files
with
786 additions
and
198 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Publish Sponsors | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: 30 15 * * 0-6 | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v4 | ||
|
||
- name: Generate Sponsors 💖 | ||
uses: JamesIves/github-sponsors-readme-action@v1 | ||
with: | ||
token: ${{ secrets.PAT }} | ||
file: 'README.md' | ||
|
||
- name: Deploy to GitHub Pages 🚀 | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
branch: main | ||
folder: '.' |
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
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
use dioxus::prelude::*; | ||
use freya_elements::elements as dioxus_elements; | ||
use freya_hooks::{use_get_theme, BodyTheme}; | ||
|
||
/// [`Body`] component properties. | ||
#[derive(Props)] | ||
pub struct BodyProps<'a> { | ||
/// Inner children for the Body. | ||
children: Element<'a>, | ||
/// Padding for the Body. | ||
#[props(default = "none".to_string(), into)] | ||
padding: String, | ||
} | ||
|
||
/// `Body` component. | ||
/// | ||
/// Usually just used one time and as a root component for all the app. | ||
/// | ||
/// # Props | ||
/// See [`BodyProps`]. | ||
/// | ||
/// # Styling | ||
/// Inherits the [`BodyTheme`](freya_hooks::BodyTheme) theme. | ||
/// | ||
/// # Example | ||
/// | ||
/// ```no_run | ||
/// # use freya::prelude::*; | ||
/// fn app(cx: Scope) -> Element { | ||
/// render!( | ||
/// Body { | ||
/// label { | ||
/// "Click this" | ||
/// } | ||
/// } | ||
/// ) | ||
/// } | ||
/// ``` | ||
/// | ||
#[allow(non_snake_case)] | ||
pub fn Body<'a>(cx: Scope<'a, BodyProps<'a>>) -> Element { | ||
let theme = use_get_theme(cx); | ||
let BodyTheme { background, color } = theme.body; | ||
let BodyProps { children, padding } = cx.props; | ||
|
||
render!(rect { | ||
width: "fill", | ||
height: "fill", | ||
color: "{color}", | ||
background: "{background}", | ||
padding: "{padding}", | ||
children | ||
}) | ||
} |
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
Oops, something went wrong.