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

feat: add input prop valueAlignment and deprecate isCentered #2453

Conversation

yvmunayev
Copy link
Contributor

fix: #2452

Changes proposed in this PR:

@nexxtway/react-rainbow

@commit-lint
Copy link

commit-lint bot commented Sep 25, 2022

Features

  • add input prop valueAlignment and depreacate isCentered (0c3f52b)

Bug Fixes

  • change valueAlignment default undefined (07f1651)
  • description valueAlignment prop (b654673)

Contributors

yvmunayev, LeandroTorresSicilia

Commit-Lint commands

You can trigger Commit-Lint actions by commenting on this PR:

  • @Commit-Lint merge patch will merge dependabot PR on "patch" versions (X.X.Y - Y change)
  • @Commit-Lint merge minor will merge dependabot PR on "minor" versions (X.Y.Y - Y change)
  • @Commit-Lint merge major will merge dependabot PR on "major" versions (Y.Y.Y - Y change)
  • @Commit-Lint merge disable will desactivate merge dependabot PR
  • @Commit-Lint review will approve dependabot PR
  • @Commit-Lint stop review will stop approve dependabot PR

@github-actions
Copy link

github-actions bot commented Sep 28, 2022

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;

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;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same ^^ here

@codeclimate
Copy link

codeclimate bot commented Oct 1, 2022

Code Climate has analyzed commit b654673 and detected 4 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 4

View more on Code Climate.

@LeandroTorresSicilia LeandroTorresSicilia merged commit 1778d2c into master Oct 2, 2022
@LeandroTorresSicilia LeandroTorresSicilia deleted the feat-add-input-prop-value-alignment-and-deprecate-is-centered branch October 2, 2022 17:38
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.

feat: add input prop valueAlignment and deprecate isCentered
2 participants