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

Implement shaded variant pagination component #1960

Merged

Conversation

amontalvof
Copy link
Collaborator

fix: #1945

Changes proposed in this PR:

@nexxtway/react-rainbow

@commit-lint
Copy link

commit-lint bot commented Oct 29, 2020

Features

  • implemented shaded variant on pagination component (a1e51d7)
  • deleted pagebuttons in pagination component (c600faf)

Contributors

@amontalvof, @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

color: ${props => props.text.title};
`;

class PaginationExample extends React.Component {

Choose a reason for hiding this comment

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

let's use hooks

const { pages, activePage, onChange, variant } = props;
return (
<>
<RenderIf isTrue={variant === 'shaded'}>

Choose a reason for hiding this comment

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

remember not use js inside jsx, use isShaded

/>
</ButtonsContainer>
</RenderIf>
<RenderIf isTrue={variant !== 'shaded'}>

Choose a reason for hiding this comment

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

same ^^

props.variant === 'shaded' &&
!props.disabled &&
`
box-shadow:${props.disabled ? '' : props.shadows.shadow_10};

Choose a reason for hiding this comment

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

remove this since here it will never be disabled

@codeclimate
Copy link

codeclimate bot commented Nov 2, 2020

Code Climate has analyzed commit ac983e8 and detected 6 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1
Duplication 5

View more on Code Climate.

@LeandroTorresSicilia LeandroTorresSicilia merged commit 6fa3a81 into master Nov 2, 2020
@LeandroTorresSicilia LeandroTorresSicilia deleted the implement-shaded-variant-pagination-component branch November 2, 2020 05:45
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 the variant "shaded" to the Pagination component
2 participants