Skip to content

Commit f56b417

Browse files
owenniblockJelloBagel
authored andcommitted
Export things we need for CommentEditor (#4513)
* Export things we need for CommentEditor * Add changeset * Update snapshot * Remove ComponentProps export and use React.ComponentProps in dotcom * Remove the bits of ComponentProps
1 parent 035d7a0 commit f56b417

File tree

6 files changed

+11
-2
lines changed

6 files changed

+11
-2
lines changed

.changeset/tiny-ghosts-notice.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/react': minor
3+
---
4+
5+
Exports createComponent

packages/react/src/RelativeTime/RelativeTime.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react'
22
import {RelativeTimeElement} from '@github/relative-time-element'
33
import type {ComponentProps} from '../utils/types'
4-
import {createComponent} from '../utils/custom-element'
4+
import {createComponent} from '../utils/create-component'
55

66
const RelativeTimeComponent = createComponent(RelativeTimeElement, 'relative-time')
77

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

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ exports[`@primer/react should not update exports without a semver change 1`] = `
5858
"type ConfirmationDialogProps",
5959
"CounterLabel",
6060
"type CounterLabelProps",
61+
"createComponent",
6162
"Details",
6263
"type DetailsProps",
6364
"Dialog",

packages/react/src/drafts/TabPanels/TabPanels.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import React from 'react'
44
import styled from 'styled-components'
55
import {get} from '../../constants'
66
import {TabContainerElement} from '@github/tab-container-element'
7-
import {createComponent} from '../../utils/custom-element'
7+
import {createComponent} from '../../utils/create-component'
88
import sx, {type SxProp} from '../../sx'
99
import type {ComponentProps} from '../../utils/types'
1010
import getGlobalFocusStyles from '../../internal/utils/getGlobalFocusStyles'

packages/react/src/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ export {useRefObjectAsForwardedRef} from './hooks/useRefObjectAsForwardedRef'
4545
export {useResizeObserver} from './hooks/useResizeObserver'
4646
export {useResponsiveValue} from './hooks/useResponsiveValue'
4747

48+
// Utils
49+
export {createComponent} from './utils/create-component'
50+
4851
// Components
4952
export {default as Radio} from './Radio'
5053
export type {RadioProps} from './Radio'

0 commit comments

Comments
 (0)