From bfc9143c977921a8db445b0474919d461966ef04 Mon Sep 17 00:00:00 2001 From: Enieber Cunha <7907068+enieber@users.noreply.github.com> Date: Mon, 7 Jun 2021 01:14:28 -0300 Subject: [PATCH 1/2] add sample text component with rescript --- docs/text.md | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/docs/text.md b/docs/text.md index 2d2ea0b..af87b04 100644 --- a/docs/text.md +++ b/docs/text.md @@ -1,5 +1,34 @@ --- id: text title: Text -wip: true +wip: false --- + +## Text component + +```res +open ReactNative + + +// start component +{"Hello World"->React.string} +// end component +``` + + +## Text component with style + +```res +open ReactNative + +let styles = { + open Style + StyleSheet.create({ + "title": textStyle(~fontSize=24., ~fontWeight=#_600, ()), + }) +} + +// start component + {"Hello World"->React.string} +// end component +``` From a125eae33c8ceb22b60974aebf41a3414914e0e6 Mon Sep 17 00:00:00 2001 From: Max Thirouin Date: Mon, 7 Jun 2021 09:22:09 +0200 Subject: [PATCH 2/2] Update text.md --- docs/text.md | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/docs/text.md b/docs/text.md index af87b04..c226d37 100644 --- a/docs/text.md +++ b/docs/text.md @@ -1,22 +1,10 @@ --- id: text title: Text -wip: false +wip: true --- -## Text component - -```res -open ReactNative - - -// start component -{"Hello World"->React.string} -// end component -``` - - -## Text component with style +## Example ```res open ReactNative @@ -28,7 +16,5 @@ let styles = { }) } -// start component {"Hello World"->React.string} -// end component ```