Update Docs CI with mdbook translation support (#516)

* Update Docs CI with mdbook translation support #514

* install mdbook with --rev
This commit is contained in:
Marco Godoy authored and GitHub committed 2022-08-04 10:26:04 -05:00
1 parent df5338f4e6
commit 9538cfe733
37 files changed
+151 -145

No files matched your search

@@ -3,13 +3,13 @@
In some cases, you may wish to create a component that acts as a container for some other content, without the component needing to know what that content is. To achieve this, create a prop of type `Element`:
```rust
{{#include ../../examples/component_element_props.rs:Clickable}}
{{#include ../../../examples/component_element_props.rs:Clickable}}
```
Then, when rendering the component, you can pass in the output of `cx.render(rsx!(...))`:
```rust
{{#include ../../examples/component_element_props.rs:Clickable_usage}}
{{#include ../../../examples/component_element_props.rs:Clickable_usage}}
```
> Note: Since `Element<'a>` is a borrowed prop, there will be no memoization.
@@ -21,11 +21,11 @@ Then, when rendering the component, you can pass in the output of `cx.render(rsx
Rather than passing the RSX through a regular prop, you may wish to accept children similarly to how elements can have children. The "magic" `children` prop lets you achieve this:
```rust
{{#include ../../examples/component_children.rs:Clickable}}
{{#include ../../../examples/component_children.rs:Clickable}}
```
This makes using the component much simpler: simply put the RSX inside the `{}` brackets – and there is no need for a `render` call or another macro!
```rust
{{#include ../../examples/component_children.rs:Clickable_usage}}
{{#include ../../../examples/component_children.rs:Clickable_usage}}
```