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

Add uppercase prop to Text, make button text uppercase by default on Android #808

Closed
wants to merge 1 commit into from

Conversation

kherock
Copy link
Contributor

@kherock kherock commented May 2, 2017

This reimplements the behavior available in previous versions of NB. I chose uppercase over capitalize since it better corresponds to the text-transform CSS property value.

To force lowercase text in buttons on Android, the component is used like

<Button>
  <Text uppercase={false}>Tap here</Text>
</Button>

This also includes some updated TypeScript definitions.

@kherock
Copy link
Contributor Author

kherock commented May 20, 2017

@shivrajkumar I noticed in your commit that merges this is inconsistent about using uppercase or capitalize in the propTypes vs what is used in the actual component. The Text type definition is also missing the new property. I'll just rebase this PR.

Btw, I really think it should be uppercase instead of capitalize (though I accidentally said the wrong thing in my commit message). Capitalize Only Affects First Letters while UPPERCASE LOOKS LIKE THIS

Plus, the actual underlying call is String.prototype.toUpperCase()

@kherock
Copy link
Contributor Author

kherock commented May 20, 2017

Ok I rebased and adjusted the commit to only include the relevant stuff. I realized that there was still the capitalize prop that must have been copied/pasted from the 1.x component and cleaned that up. Can you make sure you include the updated type definitions? I need those :P

@kherock
Copy link
Contributor Author

kherock commented May 23, 2017

@shivrajkumar sorry to ping you again, but could I at least have some acknowledgement of when this can get integrated? Or what problems you might have with my additions?

@SupriyaKalghatgi
Copy link
Contributor

Merged with 2.1.4

kherock added a commit to kherock/NativeBase that referenced this pull request May 31, 2017
This implements proper behavior for Material Design flat buttons and icon toggles - these buttons ripple as soon as the touch starts. Conveniently, React Native supports masking these ripples to the parent View's border radius. This also fixes a breakage introduced in GeekyAnts#808 that closes GeekyAnts#896.
kherock added a commit to kherock/NativeBase that referenced this pull request May 31, 2017
This implements proper behavior for Material Design flat buttons and icon toggles - these buttons ripple as soon as the touch starts. Conveniently, React Native supports masking these ripples to the parent View's border radius. This also fixes a breakage introduced in GeekyAnts#808 that closes GeekyAnts#896.
kherock added a commit to kherock/NativeBase that referenced this pull request May 31, 2017
This implements proper behavior for Material Design flat buttons and icon toggles - these buttons ripple as soon as the touch starts. Conveniently, React Native supports masking these ripples to the parent View's border radius. This also fixes a breakage introduced in GeekyAnts#808 that closes GeekyAnts#896.
kherock added a commit to kherock/NativeBase that referenced this pull request May 31, 2017
This implements proper behavior for Material Design flat buttons and icon toggles - these buttons ripple as soon as the touch starts. Conveniently, React Native supports masking these ripples to the parent View's border radius. This also fixes a breakage introduced in GeekyAnts#808 that closes GeekyAnts#896.
kherock added a commit to kherock/NativeBase that referenced this pull request May 31, 2017
This implements proper behavior for Material Design flat buttons and icon toggles - these buttons ripple as soon as the touch starts. Conveniently, React Native supports masking these ripples to the parent View's border radius. This also fixes a breakage introduced in GeekyAnts#808 that closes GeekyAnts#896.
kherock added a commit to kherock/NativeBase that referenced this pull request May 31, 2017
This implements proper behavior for Material Design flat buttons and icon toggles - these buttons ripple as soon as the touch starts. Conveniently, React Native supports masking these ripples to the parent View's border radius. This also fixes a breakage introduced in GeekyAnts#808 that closes GeekyAnts#896.
kherock added a commit to kherock/NativeBase that referenced this pull request May 31, 2017
This implements proper behavior for Material Design flat buttons and icon toggles - these buttons ripple as soon as the touch starts. Conveniently, React Native supports masking these ripples to the parent View's border radius. This also fixes a breakage introduced in GeekyAnts#808 that closes GeekyAnts#896.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants