-
Notifications
You must be signed in to change notification settings - Fork 42
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
Pagination: More precise type for renderItem #3275
Conversation
🦋 Changeset detectedLatest commit: e67fd5d The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -8,6 +8,17 @@ import PaginationItem, { | |||
PaginationItemType, | |||
} from "./PaginationItem"; | |||
|
|||
interface RenderItemProps |
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.
Should we export this?
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.
Only if it makes sense to use / pass down from outside 🤔
Man får jo typen inn når man bruker renderItem
prop (forresten, visste ikke at vi hadde renderItem før nå 😅. Lagde nettopp min egen utrolig stygge pagination med box og borderWidth 😎). Det er kanskje ikke så mange brukere av denne propen? (er nice i de tilfellene man vil ha den)
Storybook demo22f505170 | 91 komponenter | 144 stories |
Description
The type for the props in
renderItem
should reflect what we actually send to it. This is in theory a breaking change, but seems like no one is using this prop anyways. And if anyone were, there's no reason why they would try to use any of the props that are now removed from the type (since they were not there in the first place).Component Checklist 📝
@navikt/core/css/config/_mappings.js
)@navikt/core/css/tokens.json
)@navikt/aksel-stylelint/src/deprecations.ts
)@navikt/core/react/src/index.ts
and@navikt/core/react/package.json
)@navikt/core/css/index.css
)<Component>: <gitmoji?> <Text>.
E.g. "Button: ✨ Add feature xyz.")