Skip to content

Commit b90e547

Browse files
authored
feat(drafts): add Column type and createColumnHelper to exports (#3739)
* feat(drafts): add Column type and createColumnHelper to exports * chore: add changeset --------- Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
1 parent a93eca2 commit b90e547

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

.changeset/polite-hairs-switch.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@primer/react': minor
3+
---
4+
5+
Add the Column type and createColumnHelper function to easily define columns for DataTable
6+
7+
<!-- Changed components: DataTable -->

src/DataTable/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,5 @@ export type {
4949
TableActionsProps,
5050
TableSkeletonProps,
5151
} from './Table'
52+
export {createColumnHelper} from './column'
53+
export type {Column} from './column'

src/__tests__/__snapshots__/exports.test.ts.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ exports[`@primer/react/drafts should not update exports without a semver change
156156
"TreeView",
157157
"UnderlineNav",
158158
"callbackCancelledResult",
159+
"createColumnHelper",
159160
"useCombobox",
160161
"useDynamicTextareaHeight",
161162
"useIgnoreKeyboardActionsWhileComposing",

src/drafts/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
export {Blankslate} from '../Blankslate'
1010
export type {BlankslateProps} from '../Blankslate'
1111

12-
export {DataTable, Table} from '../DataTable'
12+
export {DataTable, Table, createColumnHelper} from '../DataTable'
1313
export type {
1414
DataTableProps,
1515
TableProps,
@@ -22,6 +22,7 @@ export type {
2222
TableTitleProps,
2323
TableSubtitleProps,
2424
TableActionsProps,
25+
Column,
2526
} from '../DataTable'
2627

2728
export * from '../Dialog/Dialog'

0 commit comments

Comments
 (0)