mirror of
https://github.com/yewprint/yewprint
synced 2024-11-22 11:33:04 +00:00
Add class prop to HtmlSelect (#90)
This commit is contained in:
parent
904715797a
commit
bcc89cfef5
1 changed files with 3 additions and 0 deletions
|
@ -27,6 +27,8 @@ pub struct HtmlSelectProps<T: Clone + PartialEq + 'static> {
|
||||||
pub options: Vec<(T, String)>,
|
pub options: Vec<(T, String)>,
|
||||||
#[prop_or_default]
|
#[prop_or_default]
|
||||||
pub value: Option<T>,
|
pub value: Option<T>,
|
||||||
|
#[prop_or_default]
|
||||||
|
pub class: Classes,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: Clone + PartialEq + Hash + 'static> Component for HtmlSelect<T> {
|
impl<T: Clone + PartialEq + Hash + 'static> Component for HtmlSelect<T> {
|
||||||
|
@ -94,6 +96,7 @@ impl<T: Clone + PartialEq + Hash + 'static> Component for HtmlSelect<T> {
|
||||||
self.props.large.then(|| "bp3-large"),
|
self.props.large.then(|| "bp3-large"),
|
||||||
self.props.fill.then(|| "bp3-fill"),
|
self.props.fill.then(|| "bp3-fill"),
|
||||||
self.props.disabled.then(|| "bp3-disabled"),
|
self.props.disabled.then(|| "bp3-disabled"),
|
||||||
|
self.props.class.clone(),
|
||||||
)
|
)
|
||||||
>
|
>
|
||||||
<select
|
<select
|
||||||
|
|
Loading…
Reference in a new issue