All checks were successful
actionlint check / actionlint check (pull_request) Successful in 7s
conventional pull request title check / conventional pull request title check (pull_request) Successful in 3m44s
dotenv-linter check / dotenv-linter check (pull_request) Successful in 3m46s
GitLeaks check / GitLeaks check (pull_request) Successful in 1m45s
Prettier check / Prettier check (pull_request) Successful in 2m1s
markdownlint check / markdownlint check (pull_request) Successful in 2m4s
htmlhint check / htmlhint check (pull_request) Successful in 2m6s
ShellCheck check / ShellCheck check (pull_request) Successful in 1m15s
yamllint check / yamllint check (pull_request) Successful in 1m11s
Stylelint check / Stylelint check (pull_request) Successful in 1m13s
Rust check / Rust check (pull_request) Successful in 22m46s
conventional commit messages check / conventional commit messages check (pull_request) Successful in 19s
hadolint check / hadolint check (pull_request) Successful in 25s
checkov check / checkov check (pull_request) Successful in 56s
30 lines
1.1 KiB
Rust
30 lines
1.1 KiB
Rust
use dioxus::prelude::*;
|
|
|
|
#[component]
|
|
pub(crate) fn ButtonSecondary(
|
|
class: Option<String>,
|
|
children: Element,
|
|
#[props(extends = GlobalAttributes, extends = button)] attributes: Vec<Attribute>,
|
|
// TODO: Remove this once https://github.com/DioxusLabs/dioxus/issues/4019 gets resolved.
|
|
onclick: Option<Callback<Event<MouseData>>>,
|
|
) -> Element {
|
|
rsx! {
|
|
button {
|
|
class: format!(
|
|
"cursor-pointer pb-[6px] hover:pb-[7px] active:pb-[2px] mt-[1px] hover:mt-0 active:mt-[5px] hover:*:drop-shadow-[0_7px_0_var(--color-gray-800)] active:*:drop-shadow-[0_2px_0_var(--color-gray-800)] transition-all duration-150 {}",
|
|
class.unwrap_or(String::new())
|
|
),
|
|
onclick: move |event| {
|
|
if let Some(onclick) = onclick {
|
|
onclick.call(event);
|
|
}
|
|
},
|
|
..attributes,
|
|
div {
|
|
class: "py-3.5 px-4 flex flex-row justify-center items-center bg-gray-600 drop-shadow-[0_6px_0_var(--color-gray-800)] rounded-xl transition-all duration-150",
|
|
{children}
|
|
}
|
|
}
|
|
}
|
|
}
|