-
-
Notifications
You must be signed in to change notification settings - Fork 112
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 input prop valueAlignment and deprecate isCentered #2453
feat: add input prop valueAlignment and deprecate isCentered #2453
Conversation
Features
Bug FixesContributorsyvmunayev, LeandroTorresSicilia Commit-Lint commandsYou can trigger Commit-Lint actions by commenting on this PR:
|
…precate-is-centered
Visit the preview URL for this PR (updated for commit b654673): https://react-rainbow--pr2453-feat-add-input-prop-xczdc1os.web.app (expires Sat, 08 Oct 2022 18:38:07 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
} = this.props; | ||
const isReadOnly = !!(!disabled && readOnly); | ||
const isPassword = type === 'password'; | ||
const alignment = isCentered ? 'center' : valueAlignment; |
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.
here you are giving priority, to isCentered
but since we will deprecate it, we should do the inverse, then let's give priority to the valueAlignment
over the isCentered
@@ -62,7 +62,8 @@ export default class Input extends Component { | |||
|
|||
renderInput() { | |||
const { props } = this; | |||
const { readOnly } = props; | |||
const { readOnly, isCentered, valueAlignment } = props; | |||
const alignment = isCentered ? 'center' : valueAlignment; |
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.
same ^^ here
…ntered' of https://github.com/nexxtway/react-rainbow into feat-add-input-prop-value-alignment-and-deprecate-is-centered
Code Climate has analyzed commit b654673 and detected 4 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
fix: #2452
Changes proposed in this PR:
feat: add input prop valueAlignment and deprecate isCentered
I have followed (at least) the PR section of the contributing guide.
@nexxtway/react-rainbow