Skip to content

Commit

Permalink
Export things we need for CommentEditor (#4513)
Browse files Browse the repository at this point in the history
* Export things we need for CommentEditor

* Add changeset

* Update snapshot

* Remove ComponentProps export and use React.ComponentProps in dotcom

* Remove the bits of ComponentProps
  • Loading branch information
owenniblock committed May 8, 2024
1 parent 95cd867 commit 02a2a2b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/tiny-ghosts-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': minor
---

Exports createComponent
2 changes: 1 addition & 1 deletion packages/react/src/RelativeTime/RelativeTime.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import {RelativeTimeElement} from '@github/relative-time-element'
import type {ComponentProps} from '../utils/types'
import {createComponent} from '../utils/custom-element'
import {createComponent} from '../utils/create-component'

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ exports[`@primer/react should not update exports without a semver change 1`] = `
"type ConfirmationDialogProps",
"CounterLabel",
"type CounterLabelProps",
"createComponent",
"Details",
"type DetailsProps",
"Dialog",
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/drafts/TabPanels/TabPanels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from 'react'
import styled from 'styled-components'
import {get} from '../../constants'
import {TabContainerElement} from '@github/tab-container-element'
import {createComponent} from '../../utils/custom-element'
import {createComponent} from '../../utils/create-component'
import sx, {type SxProp} from '../../sx'
import type {ComponentProps} from '../../utils/types'
import getGlobalFocusStyles from '../../internal/utils/getGlobalFocusStyles'
Expand Down
3 changes: 3 additions & 0 deletions packages/react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ export {useRefObjectAsForwardedRef} from './hooks/useRefObjectAsForwardedRef'
export {useResizeObserver} from './hooks/useResizeObserver'
export {useResponsiveValue} from './hooks/useResponsiveValue'

// Utils
export {createComponent} from './utils/create-component'

// Components
export {default as Radio} from './Radio'
export type {RadioProps} from './Radio'
Expand Down
File renamed without changes.

0 comments on commit 02a2a2b

Please sign in to comment.