From e33917c38717d00373e05f26d13bb975abef7f39 Mon Sep 17 00:00:00 2001 From: Richard LASJUNIES Date: Fri, 8 May 2020 19:07:58 +0200 Subject: [PATCH 1/6] move nestedcomponent page to component --- .../{html/components.md => components/nestedcomponents.md} | 1 + 1 file changed, 1 insertion(+) rename src/concepts/{html/components.md => components/nestedcomponents.md} (99%) diff --git a/src/concepts/html/components.md b/src/concepts/components/nestedcomponents.md similarity index 99% rename from src/concepts/html/components.md rename to src/concepts/components/nestedcomponents.md index 63f50b4..f5e02b1 100644 --- a/src/concepts/html/components.md +++ b/src/concepts/components/nestedcomponents.md @@ -1,3 +1,4 @@ +# Nested component --- description: Create complex layouts with component hierarchies --- From d930117f2eb8b1f9d99f702fa0be49cbdefe50f6 Mon Sep 17 00:00:00 2001 From: Richard LASJUNIES Date: Fri, 8 May 2020 19:09:13 +0200 Subject: [PATCH 2/6] add styling and remove css --- src/concepts/components/styling.md | 36 ++++++++++++++++++++++++++++++ src/more/css.md | 6 ----- 2 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 src/concepts/components/styling.md delete mode 100644 src/more/css.md diff --git a/src/concepts/components/styling.md b/src/concepts/components/styling.md new file mode 100644 index 0000000..6df224f --- /dev/null +++ b/src/concepts/components/styling.md @@ -0,0 +1,36 @@ +# Styling + +<Work in progress> + +Proposal for proper CSS support can be found here: [https://github.com/yewstack/yew/issues/533](https://github.com/yewstack/yew/issues/533) + + +In the meantime you can define the style with any standard CSS tools + +## Yew component does not support yet class attribute + +So far Yew component does not support natively the `class` attribute. You can add the class attribute to your component: + +```rust +#[derive(Properties, Clone, PartialEq)] +... +pub struct Props{ +... +#[prop_or_default] + pub class:String, +... +} +... +``` + +and render how you wish! + +```rust +... + html! { +
+

{"I am super Class"}

+
+ } +... +``` diff --git a/src/more/css.md b/src/more/css.md deleted file mode 100644 index 1f8894d..0000000 --- a/src/more/css.md +++ /dev/null @@ -1,6 +0,0 @@ -# CSS - -<TODO> - -Proposal for proper CSS support can be found here: [https://github.com/yewstack/yew/issues/533](https://github.com/yewstack/yew/issues/533) - From 2fbe653c50c658cae5b1be85813ada0d6fb34e66 Mon Sep 17 00:00:00 2001 From: Richard LASJUNIES Date: Fri, 8 May 2020 19:09:30 +0200 Subject: [PATCH 3/6] update summary with all the changes --- src/SUMMARY.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 99f9c4e..acba4e2 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -19,11 +19,16 @@ * [Lists](concepts/html/lists.md) * [Elements](concepts/html/elements.md) * [Literals & Expressions](concepts/html/literals-and-expressions.md) - * [Components](concepts/html/components.md) * [Components](concepts/components/README.md) + * [Internal State](concepts/components/internalstate.md) + * [Trap events](concepts/components/trapevents.md) * [Properties](concepts/components/properties.md) - * [Callbacks](concepts/components/callbacks.md) + * [Emit events](concepts/components/emitevents.md) + * [Nested component](concepts/components/nestedcomponents.md) * [Refs](concepts/components/refs.md) + * [Styling](concepts/components/styling.md) + * [Life cycle](concepts/components/lifecycle.md) + * [Callbacks](concepts/components/callbacks.md) * [Agents](concepts/agents.md) * [Services](concepts/services/README.md) * [Format](concepts/services/format.md) @@ -36,9 +41,7 @@ ## More -* [CSS](more/css.md) * [Roadmap](more/roadmap.md) * [Testing](more/testing.md) * [Debugging](more/debugging.md) * [External Libs](more/external-libs.md) - From e04dee33f29d33ded9ac353896b34d0c3a6c8ea8 Mon Sep 17 00:00:00 2001 From: Richard LASJUNIES Date: Sat, 9 May 2020 18:24:14 +0200 Subject: [PATCH 4/6] update following teymour feedbacks --- src/concepts/components/nestedcomponents.md | 2 +- src/concepts/components/styling.md | 33 ++------------------- 2 files changed, 3 insertions(+), 32 deletions(-) diff --git a/src/concepts/components/nestedcomponents.md b/src/concepts/components/nestedcomponents.md index f5e02b1..b49d17b 100644 --- a/src/concepts/components/nestedcomponents.md +++ b/src/concepts/components/nestedcomponents.md @@ -1,4 +1,4 @@ -# Nested component +# Nested components --- description: Create complex layouts with component hierarchies --- diff --git a/src/concepts/components/styling.md b/src/concepts/components/styling.md index 6df224f..cd283c0 100644 --- a/src/concepts/components/styling.md +++ b/src/concepts/components/styling.md @@ -2,35 +2,6 @@ <Work in progress> -Proposal for proper CSS support can be found here: [https://github.com/yewstack/yew/issues/533](https://github.com/yewstack/yew/issues/533) +A proposal for proper CSS support can be found here: [https://github.com/yewstack/yew/issues/533](https://github.com/yewstack/yew/issues/533) - -In the meantime you can define the style with any standard CSS tools - -## Yew component does not support yet class attribute - -So far Yew component does not support natively the `class` attribute. You can add the class attribute to your component: - -```rust -#[derive(Properties, Clone, PartialEq)] -... -pub struct Props{ -... -#[prop_or_default] - pub class:String, -... -} -... -``` - -and render how you wish! - -```rust -... - html! { -
-

{"I am super Class"}

-
- } -... -``` +In the meantime you can define the style with any standard CSS tools. From 461f59bb9add3969fe572c4e69d05904303c6627 Mon Sep 17 00:00:00 2001 From: Richard LASJUNIES Date: Sat, 9 May 2020 18:30:14 +0200 Subject: [PATCH 5/6] update summary based on Teymour feedbacks --- src/SUMMARY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SUMMARY.md b/src/SUMMARY.md index acba4e2..7528572 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -27,7 +27,7 @@ * [Nested component](concepts/components/nestedcomponents.md) * [Refs](concepts/components/refs.md) * [Styling](concepts/components/styling.md) - * [Life cycle](concepts/components/lifecycle.md) + * [Lifecycle](concepts/components/lifecycle.md) * [Callbacks](concepts/components/callbacks.md) * [Agents](concepts/agents.md) * [Services](concepts/services/README.md) From b73eb8257b839f29469a80fa408814814c2f3126 Mon Sep 17 00:00:00 2001 From: Richard LASJUNIES Date: Sun, 10 May 2020 10:41:05 +0200 Subject: [PATCH 6/6] replace Trap events by Listen to --- src/SUMMARY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 7528572..2ded623 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -21,7 +21,7 @@ * [Literals & Expressions](concepts/html/literals-and-expressions.md) * [Components](concepts/components/README.md) * [Internal State](concepts/components/internalstate.md) - * [Trap events](concepts/components/trapevents.md) + * [Listen to events](concepts/components/trapevents.md) * [Properties](concepts/components/properties.md) * [Emit events](concepts/components/emitevents.md) * [Nested component](concepts/components/nestedcomponents.md)