use fission::prelude::*;
use fission::op::AlignItems;
fission_component! {
pub SecuritySummary<()> {
props {
email: String,
password_changed: String,
}
}
view(summary, _state, cx) {
let tokens = &cx.view.env().theme.tokens;
} =>
Column(
gap: tokens.spacing.m,
align_items: AlignItems::Stretch,
children: [
Text(cx.tr("account.security")),
Text(summary.email.clone()),
Text(summary.password_changed.clone()),
],
)
}
Field | Type | Meaning | Notes / default behavior |
|---|---|---|---|
id | Option<WidgetId> | Stable widget identity. | Defaults to None. |
children | Vec<Widget> | Child widgets laid out from top to bottom. | Defaults to an empty list. |
semantics | Option<Semantics> | Optional accessibility semantics wrapper. | When present, the lowered column is wrapped in a semantics node. |
flex_grow | f32 | How much extra space the column absorbs from its parent. | Defaults to 0.0. |
flex_shrink | f32 | How much the column is allowed to shrink when space is tight. | Defaults to 1.0. |
gap | Option<f32> | Vertical spacing between children. | Defaults to None. |
wrap | FlexWrap | Whether children wrap when they overflow. | Defaults to FlexWrap::NoWrap. Most columns do not wrap. |
align_items | AlignItems | Cross-axis alignment, which is horizontal in a column. | Defaults to AlignItems::Stretch. |
justify_content | JustifyContent | Main-axis distribution, which is vertical in a column. | Defaults to JustifyContent::Start. |