Skip to content
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

Export things we need for CommentEditor #4513

Merged
merged 6 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 and ComponentProps
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 @@ -54,10 +54,12 @@ exports[`@primer/react should not update exports without a semver change 1`] = `
"type CircleBadgeProps",
"CircleOcticon",
"type CircleOcticonProps",
"type ComponentProps",
"ConfirmationDialog",
"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'
Copy link
Member

Choose a reason for hiding this comment

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

For stability, is this something that we feel like will be stable/unlikely to change without a breaking change or would it be helpful to have a "bake period" in drafts/experimental before promoting to stable?

Wasn't sure about the status of the helper and wanted to check-in 👍 Totally understand either way.

Copy link
Member

Choose a reason for hiding this comment

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

It'll likely be removed when we upgrade to React 19. In lieu of that I think any changes can happen alongside major releases. I don't anticipate huge changes.


// Components
export {default as Radio} from './Radio'
export type {RadioProps} from './Radio'
Expand Down
Loading