-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
feat: Add button types #1540
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
feat: Add button types #1540
Conversation
Still to add tests, and screen shots to docs. |
Looks good. And I assume Can you also share code snippets for those screenshots? would help to see what props you are using to achieve that. |
@@ -32,6 +32,7 @@ | |||
"logo": "https://opencollective.com/react-native-elements/logo.txt" | |||
}, | |||
"dependencies": { | |||
"color": "^3.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this packages provide us?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a module to work with colors as strings and perform operations like lighten, darken that you'd normally have with sass etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Snippets are super simple. Used the theme provider. const theme = {
Button: {
// disabled: true,
// raised: true,
buttonStyle: {
width: 150,
},
containerStyle: {
margin: 16,
},
},
}; <ThemeProvider theme={theme}>
<Button title="Solid" />
<Button type="clear" title="Clear" />
<Button type="outline" title="Outline" />
</ThemeProvider> |
Codecov Report
@@ Coverage Diff @@
## next #1540 +/- ##
==========================================
+ Coverage 75.49% 75.72% +0.23%
==========================================
Files 33 33
Lines 612 618 +6
Branches 85 86 +1
==========================================
+ Hits 462 468 +6
Misses 129 129
Partials 21 21
Continue to review full report at Codecov.
|
Raised clear button looks the same as solid button
Add images show button type and states. Also cleanup prop descriptions
* commit '0126436f5f0f37e0340b0c1da32bdea5605cb6df': (43 commits) feat(Card): Remove flexDirection prop feat(Card): Remove fontFamily prop test: Add tests for withTheme test: Fix searcbar error being logged to console fix: Hoist statics for withTheme hoc (react-native-elements#1554) fix: Use library for calculating statusBar height (react-native-elements#1553) ref: Badge component (react-native-elements#1545) Set default prop for type (react-native-elements#1546) docs: Fix paragraphs links in docs (react-native-elements#1536) docs(website): Make image preview section reusable feat: Add button types (react-native-elements#1540) fix: Rounded buttons on android now work correctly (react-native-elements#1538) ci: Run travis against node stable fix: Make button height consistent when using loading ci: Update husky and lint-staged feat: Add AntDesign to list of available icon sets (react-native-elements#1529) docs(website): Add central place to show supported icon sets (react-native-elements#1532) feat(Input): Allow label to be a React element (react-native-elements#1531) ci: Remove expo ci from PRs (react-native-elements#1528) fix(Button): Make the padding consistent (react-native-elements#1505) ...
Implements #1525
Adds three button types to the Button component:
Changes
clear
prop.Examples
Normal state
Raised state
Disabled state