-
Notifications
You must be signed in to change notification settings - Fork 536
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Header no longer accepts styled system props
- Loading branch information
Showing
4 changed files
with
42 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@primer/components': major | ||
--- | ||
|
||
Header no longer accepts styled-system props. Please use the `sx` prop to extend Primer component styling instead. See also https://primer.style/react/overriding-styles for information about `sx` and https://primer.style/react/system-props for context on the removal. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react' | ||
import Header from '../Header' | ||
|
||
export function shouldAcceptCallWithNoProps() { | ||
return <Header /> | ||
} | ||
|
||
export function shouldNotAcceptSystemProps() { | ||
return ( | ||
<> | ||
{/* @ts-expect-error system props should not be accepted */} | ||
<Header backgroundColor="saddlebrown" /> | ||
{/* @ts-expect-error system props should not be accepted */} | ||
<Header.Item backgroundColor="salmon" /> | ||
{/* @ts-expect-error system props should not be accepted */} | ||
<Header.Link backgroundColor="sandybrown" /> | ||
</> | ||
) | ||
} |