Doc update
This commit is contained in:
parent
28e4f21baa
commit
78e5a53c3b
1 changed files with 7 additions and 1 deletions
|
|
@ -95,7 +95,13 @@ A custom component would look like the following:
|
||||||
``` rust
|
``` rust
|
||||||
use alchemy::{Component, ComponentKey, Error, Props, rsx, RSX};
|
use alchemy::{Component, ComponentKey, Error, Props, rsx, RSX};
|
||||||
|
|
||||||
pub struct MySpecialWidget;
|
#[derive(Default)]
|
||||||
|
pub struct MySpecialWidgetProps;
|
||||||
|
|
||||||
|
#[derive(Props)]
|
||||||
|
pub struct MySpecialWidget {
|
||||||
|
props: MySpecialWidgetProps
|
||||||
|
}
|
||||||
|
|
||||||
impl Component for MySpecialWidget {
|
impl Component for MySpecialWidget {
|
||||||
fn new(key: ComponentKey) -> MySpecialWidget {
|
fn new(key: ComponentKey) -> MySpecialWidget {
|
||||||
|
|
|
||||||
Reference in a new issue