Add UI setting components (#13550)
Adds some of the UI components to allow us to visually render settings. These are UI only and are not functional yet (@maxdeviant will be working on these when he is back.) You can see some examples by running `script/storybook setting`.  Release Notes: - N/A
This commit is contained in:
parent
2dc840132b
commit
4d5441c09d
14 changed files with 717 additions and 5 deletions
|
@ -29,3 +29,23 @@ impl Selection {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<bool> for Selection {
|
||||
fn from(selected: bool) -> Self {
|
||||
if selected {
|
||||
Self::Selected
|
||||
} else {
|
||||
Self::Unselected
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Option<bool>> for Selection {
|
||||
fn from(selected: Option<bool>) -> Self {
|
||||
match selected {
|
||||
Some(true) => Self::Selected,
|
||||
Some(false) => Self::Unselected,
|
||||
None => Self::Unselected,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue