pub struct ComponentNode {
pub key: String,
pub component: Component,
pub action: Option<Action>,
pub visibility: Option<Visibility>,
}Expand description
A component node wrapping a component with shared fields.
Every component in a view tree is wrapped in a ComponentNode that
provides a unique key, optional action binding, and optional visibility
rules. The component itself is flattened into the node’s JSON.
Fields§
§key: String§component: Component§action: Option<Action>§visibility: Option<Visibility>Implementations§
Source§impl ComponentNode
impl ComponentNode
Sourcepub fn table(key: impl Into<String>, props: TableProps) -> Self
pub fn table(key: impl Into<String>, props: TableProps) -> Self
Create a Table component node.
Create a Button component node.
Sourcepub fn input(key: impl Into<String>, props: InputProps) -> Self
pub fn input(key: impl Into<String>, props: InputProps) -> Self
Create an Input component node.
Sourcepub fn select(key: impl Into<String>, props: SelectProps) -> Self
pub fn select(key: impl Into<String>, props: SelectProps) -> Self
Create a Select component node.
Sourcepub fn alert(key: impl Into<String>, props: AlertProps) -> Self
pub fn alert(key: impl Into<String>, props: AlertProps) -> Self
Create an Alert component node.
Sourcepub fn badge(key: impl Into<String>, props: BadgeProps) -> Self
pub fn badge(key: impl Into<String>, props: BadgeProps) -> Self
Create a Badge component node.
Sourcepub fn modal(key: impl Into<String>, props: ModalProps) -> Self
pub fn modal(key: impl Into<String>, props: ModalProps) -> Self
Create a Modal component node.
Sourcepub fn checkbox(key: impl Into<String>, props: CheckboxProps) -> Self
pub fn checkbox(key: impl Into<String>, props: CheckboxProps) -> Self
Create a Checkbox component node.
Sourcepub fn switch(key: impl Into<String>, props: SwitchProps) -> Self
pub fn switch(key: impl Into<String>, props: SwitchProps) -> Self
Create a Switch component node.
Sourcepub fn separator(key: impl Into<String>, props: SeparatorProps) -> Self
pub fn separator(key: impl Into<String>, props: SeparatorProps) -> Self
Create a Separator component node.
Sourcepub fn description_list(
key: impl Into<String>,
props: DescriptionListProps,
) -> Self
pub fn description_list( key: impl Into<String>, props: DescriptionListProps, ) -> Self
Create a DescriptionList component node.
Create a Breadcrumb component node.
Sourcepub fn pagination(key: impl Into<String>, props: PaginationProps) -> Self
pub fn pagination(key: impl Into<String>, props: PaginationProps) -> Self
Create a Pagination component node.
Sourcepub fn progress(key: impl Into<String>, props: ProgressProps) -> Self
pub fn progress(key: impl Into<String>, props: ProgressProps) -> Self
Create a Progress component node.
Sourcepub fn avatar(key: impl Into<String>, props: AvatarProps) -> Self
pub fn avatar(key: impl Into<String>, props: AvatarProps) -> Self
Create an Avatar component node.
Sourcepub fn skeleton(key: impl Into<String>, props: SkeletonProps) -> Self
pub fn skeleton(key: impl Into<String>, props: SkeletonProps) -> Self
Create a Skeleton component node.
Sourcepub fn stat_card(key: impl Into<String>, props: StatCardProps) -> Self
pub fn stat_card(key: impl Into<String>, props: StatCardProps) -> Self
Create a StatCard component node.
Sourcepub fn checklist(key: impl Into<String>, props: ChecklistProps) -> Self
pub fn checklist(key: impl Into<String>, props: ChecklistProps) -> Self
Create a Checklist component node.
Sourcepub fn toast(key: impl Into<String>, props: ToastProps) -> Self
pub fn toast(key: impl Into<String>, props: ToastProps) -> Self
Create a Toast component node.
Sourcepub fn notification_dropdown(
key: impl Into<String>,
props: NotificationDropdownProps,
) -> Self
pub fn notification_dropdown( key: impl Into<String>, props: NotificationDropdownProps, ) -> Self
Create a NotificationDropdown component node.
Create a Sidebar component node.
Sourcepub fn header(key: impl Into<String>, props: HeaderProps) -> Self
pub fn header(key: impl Into<String>, props: HeaderProps) -> Self
Create a Header component node.
Sourcepub fn collapsible(key: impl Into<String>, props: CollapsibleProps) -> Self
pub fn collapsible(key: impl Into<String>, props: CollapsibleProps) -> Self
Create a Collapsible component node.
Sourcepub fn empty_state(key: impl Into<String>, props: EmptyStateProps) -> Self
pub fn empty_state(key: impl Into<String>, props: EmptyStateProps) -> Self
Create an EmptyState component node.
Sourcepub fn form_section(key: impl Into<String>, props: FormSectionProps) -> Self
pub fn form_section(key: impl Into<String>, props: FormSectionProps) -> Self
Create a FormSection component node.
Create a DropdownMenu component node.
Sourcepub fn kanban_board(key: impl Into<String>, props: KanbanBoardProps) -> Self
pub fn kanban_board(key: impl Into<String>, props: KanbanBoardProps) -> Self
Create a KanbanBoard component node.
Sourcepub fn calendar_cell(key: impl Into<String>, props: CalendarCellProps) -> Self
pub fn calendar_cell(key: impl Into<String>, props: CalendarCellProps) -> Self
Create a CalendarCell component node.
Sourcepub fn action_card(key: impl Into<String>, props: ActionCardProps) -> Self
pub fn action_card(key: impl Into<String>, props: ActionCardProps) -> Self
Create an ActionCard component node.
Sourcepub fn product_tile(key: impl Into<String>, props: ProductTileProps) -> Self
pub fn product_tile(key: impl Into<String>, props: ProductTileProps) -> Self
Create a ProductTile component node.
Sourcepub fn data_table(key: impl Into<String>, props: DataTableProps) -> Self
pub fn data_table(key: impl Into<String>, props: DataTableProps) -> Self
Create a DataTable component node.
Sourcepub fn image(key: impl Into<String>, props: ImageProps) -> Self
pub fn image(key: impl Into<String>, props: ImageProps) -> Self
Create an Image component node.
Sourcepub fn plugin_component(key: impl Into<String>, props: PluginProps) -> Self
pub fn plugin_component(key: impl Into<String>, props: PluginProps) -> Self
Create a Plugin component node.
Use plugin_component to avoid ambiguity with any plugin module.
Trait Implementations§
Source§impl Clone for ComponentNode
impl Clone for ComponentNode
Source§fn clone(&self) -> ComponentNode
fn clone(&self) -> ComponentNode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more