Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Components/button: Added documentation for textStyle and iconRight props #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
ADDED documentation for textStyle and iconRight props
FIXED typo in color prop documentation
FIXED Grammar in component intro paragraph
Ayush Gupta committed Sep 28, 2020
commit bd2742d53152794daf1f77eb76dd8f9df578f8f8
6 changes: 4 additions & 2 deletions components/button.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Button

A basic button component that is looking good on any platform. This react native button is ready to handle most used scenarios which will enable you to build apps faster with cleaner code.
A basic button component that looks good on any platform. This react native button is ready to handle most used scenarios which will enable you to build apps faster with cleaner code.

<p align="center">
<img src="https://i.imgur.com/JjkraTc.png" />
@@ -43,11 +43,12 @@ Code example:
|:-----------------------------:|:------------:|:------------------:|:----------------------------------------------------------------------------------------------------:|
| ...TouchableOpacity.propTypes | | | |
| capitalize | bool | false | Transforms the first character in a capital letter |
| color | string | 'primary' | your options are: 'primary', 'theme', 'error', 'warning', 'succes', 'transparent' or your own color |
| color | string | 'primary' | your options are: 'primary', 'theme', 'error', 'warning', 'success', 'transparent' or your own color |
| disabled | bool | false | Disables the button |
| icon | bool, string | false | pick whatever icon you want from Expo's icons |
| iconColor | bool, string | theme.COLORS.BLACK | sets the icon's color |
| iconFamily | bool, string | false | pick whatever icon family suits the icon you chose from Expo's icons |
| iconRight | bool, string | false | if true, icon is rendered on the right of text |
| iconSize | number | 14 | sets the icon's size |
| loading | bool | false | Uses the <ActivityIndicator /> for the loading effect |
| loadingSize | string | 'small' | your options are: 'small', 'large' |
@@ -58,4 +59,5 @@ Code example:
| shadowColor | bool, string | false | the default shadowColor is based on the button's color but you can also write a specific shadowColor |
| shadowless | bool | false | removes shadow |
| size | number | 'large' | your options are: 'large', 'small' |
| textStyle | object | | custom style for text inside button |
| uppercase | bool | false | makes all letters uppercase |