From a4178c58f9045eae276f359521b6213d1cfd3257 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 23 Sep 2020 18:15:19 +0200 Subject: [PATCH] Revert "Added text component (#7)" This reverts commit bd93ee30481480c6e561edb55a916986cc091f6b. --- README.md | 2 +- src/forms/mod.rs | 1 - src/forms/text.rs | 93 ----------------------------------------------- 3 files changed, 1 insertion(+), 95 deletions(-) delete mode 100644 src/forms/text.rs diff --git a/README.md b/README.md index 3b1dfff..dc8abea 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ Roadmap - [ ] [Spinner](https://blueprintjs.com/docs/#core/components/spinner) - [ ] [Tabs](https://blueprintjs.com/docs/#core/components/tabs) - [ ] [Tag](https://blueprintjs.com/docs/#core/components/tag) - - [x] [Text](https://blueprintjs.com/docs/#core/components/text) + - [ ] [Text](https://blueprintjs.com/docs/#core/components/text) - [x] [Tree](https://blueprintjs.com/docs/#core/components/tree) - depends on: Collapse, Icon - [ ] [FormGroup](https://blueprintjs.com/docs/#core/components/form-group) diff --git a/src/forms/mod.rs b/src/forms/mod.rs index 11d1711..1a8fe5f 100644 --- a/src/forms/mod.rs +++ b/src/forms/mod.rs @@ -1,2 +1 @@ pub mod controls; -pub mod text; diff --git a/src/forms/text.rs b/src/forms/text.rs deleted file mode 100644 index d2e7f34..0000000 --- a/src/forms/text.rs +++ /dev/null @@ -1,93 +0,0 @@ -use yew::prelude::*; - -pub struct Text { - props: Props, -} - -#[derive(Clone, PartialEq, Properties)] -pub struct Props { - #[prop_or_default] - pub value: String, - #[prop_or_default] - pub oninput:Callback -} - - -impl Component for Text { - type Message = (); - type Properties = Props; - - fn create(props: Self::Properties, _link: ComponentLink) -> Self { - Text { props } - } - - fn update(&mut self, _msg: Self::Message) -> ShouldRender { - true - } - - fn change(&mut self, props: Self::Properties) -> ShouldRender { - if self.props != props { - self.props = props; - true - } else { - false - } - } - - fn view(&self) -> Html { - html! { -