Some checks failed
conventional pull request title check / conventional pull request title check (pull_request) Successful in 4s
conventional commit messages check / conventional commit messages check (pull_request) Successful in 11s
dotenv-linter check / dotenv-linter check (pull_request) Successful in 9s
GitLeaks check / GitLeaks check (pull_request) Successful in 11s
markdownlint check / markdownlint check (pull_request) Successful in 20s
htmlhint check / htmlhint check (pull_request) Successful in 25s
hadolint check / hadolint check (pull_request) Failing after 57s
checkov check / checkov check (pull_request) Successful in 1m20s
Prettier check / Prettier check (pull_request) Successful in 34s
ShellCheck check / ShellCheck check (pull_request) Successful in 29s
Stylelint check / Stylelint check (pull_request) Failing after 29s
yamllint check / yamllint check (pull_request) Successful in 24s
Rust check / Rust check (pull_request) Failing after 2m6s
actionlint check / actionlint check (pull_request) Successful in 7s
26 lines
956 B
Rust
26 lines
956 B
Rust
use crate::models::project::Project;
|
|
use crate::models::task::Task;
|
|
use dioxus::prelude::*;
|
|
|
|
#[component]
|
|
pub(crate) fn FormOpenButton(opened: Signal<bool>) -> Element {
|
|
let mut project_being_edited = use_context::<Signal<Option<Project>>>();
|
|
let mut task_being_edited = use_context::<Signal<Option<Task>>>();
|
|
|
|
rsx! {
|
|
button {
|
|
class: "pointer-events-auto m-4 py-3 px-5 self-end text-center bg-zinc-300/50 rounded-xl border-t-zinc-200 border-t backdrop-blur drop-shadow-[0_-5px_10px_rgba(0,0,0,0.2)] text-2xl text-zinc-200 cursor-pointer",
|
|
onclick: move |_| {
|
|
if opened() {
|
|
project_being_edited.set(None);
|
|
task_being_edited.set(None);
|
|
}
|
|
opened.set(!opened());
|
|
},
|
|
i {
|
|
class: format!("min-w-6 fa-solid {}", if opened() { "fa-xmark" } else { "fa-plus" }),
|
|
}
|
|
}
|
|
}
|
|
}
|