import {
forwardRef,
useId,
type ForwardedRef,
type HTMLAttributes,
} from 'react'
import {
getAlertDialogHeadingProps,
getAlertDialogLabelProps,
} from '@pluralsight/headless-styles'
//
type AlertHeadingProps = HTMLAttributes
function AlertHeadingEl(
props: AlertHeadingProps,
ref: ForwardedRef
) {
const defaultId = useId()
return (
{props.children}
)
}
//
interface AlertLabelProps
extends Omit, 'htmlFor'> {
htmlFor: string
}
function AlertLabelEl(
props: AlertLabelProps,
ref: ForwardedRef
) {
return (
)
}
//
// There is no API for this component. It is just a wrapper for the text for
// consistency.
type AlertTextProps = HTMLAttributes
function AlertTextEl(
props: AlertTextProps,
ref: ForwardedRef
) {
return
}
// exports
export const AlertDialogHeading = forwardRef<
HTMLHeadingElement,
AlertHeadingProps
>(AlertHeadingEl)
export const AlertDialogLabel = forwardRef(
AlertLabelEl
)
export const AlertDialogText = forwardRef(
AlertTextEl
)