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

chore(Pagehead): Remove the CSS module feature flag from Pagehead #5462

Merged
merged 4 commits into from
Jan 8, 2025
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Support as for Pagehead
jonrohan committed Dec 19, 2024
commit 6967171f2ea3b8add004bf3053bc19baa0701478
7 changes: 5 additions & 2 deletions packages/react/src/Pagehead/Pagehead.tsx
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ import {defaultSxProp} from '../utils/defaultSxProp'
import Box from '../Box'

const Pagehead = ({className, sx: sxProp = defaultSxProp, ...rest}: PageheadProps) => {
if (sxProp !== defaultSxProp) {
if (sxProp !== defaultSxProp || rest.as) {
return <Box sx={sxProp} className={clsx(classes.Pagehead, className)} {...rest} />
}
return <div className={clsx(classes.Pagehead, className)} {...rest} />
@@ -15,5 +15,8 @@ const Pagehead = ({className, sx: sxProp = defaultSxProp, ...rest}: PageheadProp
/**
* @deprecated
*/
export type PageheadProps = SxProp & React.ComponentPropsWithoutRef<'div'>
export type PageheadProps = SxProp &
React.ComponentPropsWithoutRef<'div'> & {
as?: React.ElementType
}
export default Pagehead