Skip to content

Conversation

@BPScott
Copy link
Member

@BPScott BPScott commented May 7, 2020

WHY are these changes introduced?

I want to put some chunkier text into the Pagination label

WHAT is this pull request doing?

Loosen the type of Pagination label to allow for React.ReactNode instead of only strings.

How to 🎩

See that the below code type checks.

Copy-paste this code in playground/Playground.tsx:
import React from 'react';

import {Page, Pagination, DisplayText} from '../src';

export function Playground() {
  return (
    <Page title="Playground">
      <Pagination
        hasNext
        hasPrevious
        label={<DisplayText>CHONK</DisplayText>}
      />
    </Page>
  );
}

@BPScott BPScott requested a review from danloomer May 7, 2020 19:38
@github-actions
Copy link
Contributor

github-actions bot commented May 7, 2020

🟢 This pull request modifies 2 files and might impact 2 other files.

Details:
All files potentially affected (total: 2)
📄 UNRELEASED.md (total: 0)

Files potentially affected (total: 0)

🧩 src/components/Pagination/Pagination.tsx (total: 2)

Files potentially affected (total: 2)

@BPScott BPScott force-pushed the widen-pagination-label branch from 0be1ff6 to b8f29e8 Compare May 7, 2020 19:43
Copy link

@danloomer danloomer left a comment

Choose a reason for hiding this comment

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

Lovely 😭

@BPScott BPScott merged commit c929036 into master May 7, 2020
@BPScott BPScott deleted the widen-pagination-label branch May 7, 2020 20:39
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