-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: Listbox and OptionGroup * feat: adds TagPickerOptionGroup component * fix: call_on_click_outside_with_list
- Loading branch information
1 parent
09ef9f8
commit 092581d
Showing
15 changed files
with
172 additions
and
53 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 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.
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,3 @@ | ||
pub mod listbox; | ||
pub mod option_group; | ||
mod utils; |
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,25 @@ | ||
use leptos::prelude::*; | ||
use thaw_utils::{class_list, mount_style}; | ||
|
||
#[component] | ||
pub fn OptionGroup( | ||
class_prefix: &'static str, | ||
class: MaybeProp<String>, | ||
/// Label of the group. | ||
label: String, | ||
children: Children, | ||
) -> impl IntoView { | ||
mount_style("option-group", include_str!("./option-group.css")); | ||
|
||
view! { | ||
<div role="group" class=class_list!["thaw-option-group", class_prefix, class]> | ||
<span | ||
role="presentation" | ||
class=format!("thaw-option-group__label {class_prefix}__label") | ||
> | ||
{label} | ||
</span> | ||
{children()} | ||
</div> | ||
} | ||
} |
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
mod combobox; | ||
mod combobox_option; | ||
mod combobox_option_group; | ||
pub(crate) mod listbox; | ||
mod utils; | ||
mod common; | ||
|
||
pub use combobox::*; | ||
pub use combobox_option::*; | ||
pub use combobox_option_group::*; | ||
pub(crate) use common::*; |
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,13 @@ | ||
use crate::option_group::OptionGroup; | ||
use leptos::prelude::*; | ||
|
||
#[component] | ||
pub fn TagPickerOptionGroup( | ||
#[prop(optional, into)] class: MaybeProp<String>, | ||
/// Label of the group. | ||
#[prop(into)] | ||
label: String, | ||
children: Children, | ||
) -> impl IntoView { | ||
view! { <OptionGroup class_prefix="thaw-tag-picker-option-group" class label 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