feat: clear code

This commit is contained in:
luoxiao 2024-05-16 16:18:36 +08:00
parent 7231e0cac1
commit f178d7c9ca
3 changed files with 5 additions and 24 deletions

View file

@ -83,9 +83,9 @@ impl IntoView for MenuGroupOption {
let Self { label, children } = self;
let children_len = children.len();
view! {
<Text>
<Caption1Strong>
{format!("{label} ({children_len})")}
</Text>
</Caption1Strong>
{children.into_iter().map(|v| v.into_view()).collect_view()}
}.into_view()
}
@ -99,7 +99,6 @@ pub(crate) struct MenuItemOption {
impl IntoView for MenuItemOption {
fn into_view(self) -> View {
let Self { label, value } = self;
// key=value label
view! { <NavItem value>{label}</NavItem> }
}
}

View file

@ -4,7 +4,9 @@
view! {
<Card>
<CardHeader>
<Body1>"Header"</Body1>
<Body1>
<b>"Header"</b>"2022-02-22"
</Body1>
<CardHeaderDescription slot>
<Caption1>"Description"</Caption1>
</CardHeaderDescription>

View file

@ -22,23 +22,3 @@
.thaw-card > .thaw-card-preview {
margin: 0 calc(var(--thaw-card--size)* -1);
}
.thaw-card__header-extra {
display: flex;
align-items: center;
}
.thaw-card__header-content {
flex: 1;
}
.thaw-card__header,
.thaw-card__content,
.thaw-card__footer {
padding: 12px 28px;
}
.thaw-card__header {
padding: 20px 28px;
}
.thaw-card__header + .thaw-card__content,
.thaw-card__footer {
padding: 0 28px 20px;
}