From b1de466a523a0f188142f4e52c5eed295e2fb23a Mon Sep 17 00:00:00 2001
From: Enieber Cunha <7907068+enieber@users.noreply.github.com>
Date: Mon, 7 Jun 2021 01:36:19 -0300
Subject: [PATCH 1/2] create documentation of button component
---
docs/button.md | 133 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 132 insertions(+), 1 deletion(-)
diff --git a/docs/button.md b/docs/button.md
index 43d2865..2b57794 100644
--- a/docs/button.md
+++ b/docs/button.md
@@ -1,5 +1,136 @@
---
id: button
title: Button
-wip: true
---
+
+A basic button component that should render nicely on any platform. Supports a minimal level of customization.
+
+If this button doesn't look right for your app, you can build your own button using [TouchableOpacity](touchableopacity) or [TouchableWithoutFeedback](touchablewithoutfeedback).
+
+```res
+
+```
+
+## Example
+
+```SnackPlayer name=Button%20Example
+open ReactNative
+
+let styles = {
+ open Style
+ StyleSheet.create({
+ "title": textStyle(~fontSize=24., ~fontWeight=#_600, ()),
+ })
+}
+
+@react.component
+let app = () => {
+
+
+
+ {"Button component"->React.string}
+
+
+}
+```
+
+---
+
+# Reference
+
+## Props
+
+###
Required
**`onPress`**
+
+Handler to be called when the user taps the button.
+
+| Type |
+| ---------------------------------- |
+| function([PressEvent](pressevent)) |
+
+---
+
+###
Required
**`title`**
+
+Text to display inside the button. On Android the given title will be converted to the uppercased form.
+
+| Type |
+| ------ |
+| string |
+
+---
+
+### `accessibilityLabel`
+
+Text to display for blindness accessibility features.
+
+| Type |
+| ------ |
+| string |
+
+---
+
+### `color`
+
+Color of the text (iOS), or background color of the button (Android).
+
+| Type | Default |
+| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [color](colors) | `'#2196F3'`
Android
`'#007AFF'`
iOS
|
+
+---
+
+### `disabled`
+
+If `true`, disable all interactions for this component.
+
+| Type | Default |
+| ---- | ------- |
+| bool | `false` |
+
+---
+### `testID`
+
+Used to locate this view in end-to-end tests.
+
+| Type |
+| ------ |
+| string |
+
+---
+
+### `touchSoundDisabled`
Android
+
+If `true`, doesn't play system sound on touch.
+
+| Type | Default |
+| ------- | ------- |
+| boolean | `false` |
From 4c71fa374023132d7fb186aeb3fd53de159c5c2a Mon Sep 17 00:00:00 2001
From: Enieber Cunha <7907068+enieber@users.noreply.github.com>
Date: Mon, 7 Jun 2021 04:43:07 -0300
Subject: [PATCH 2/2] fix: doc button errors find in review
---
docs/button.md | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/docs/button.md b/docs/button.md
index 2b57794..b749eaa 100644
--- a/docs/button.md
+++ b/docs/button.md
@@ -1,11 +1,12 @@
---
id: button
title: Button
+wip: true
---
A basic button component that should render nicely on any platform. Supports a minimal level of customization.
-If this button doesn't look right for your app, you can build your own button using [TouchableOpacity](touchableopacity) or [TouchableWithoutFeedback](touchablewithoutfeedback).
+If this button doesn't look right for your app, you can build your own button using [Pressable](pressable).
```res
{
## Props
-###
Required
**`onPress`**
+### Required **`onPress`**
Handler to be called when the user taps the button.
| Type |
| ---------------------------------- |
-| function([PressEvent](pressevent)) |
+| function(PressEvent) |
---
-###
Required
**`title`**
+### Required **`title`**
Text to display inside the button. On Android the given title will be converted to the uppercased form.
@@ -104,7 +105,7 @@ Color of the text (iOS), or background color of the button (Android).
| Type | Default |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| [color](colors) | `'#2196F3'`