-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(page-header): add PageHeaderSeparator, also use page header on d…
…ocs site (#3731) * chore: update docs site page headers round 1 * feat(page-header): add PageHeaderSeparator * chore: page header docs site updates round 2 * chore: page header replace docs updates round 3 * chore: add pageHeaderSeparator to docs and megan updates * chore: test fix and typedocs * chore: changeset * chore: sarah feedback * chore: sarah feedback 2 * chore: fix page header capitalization
- Loading branch information
Showing
88 changed files
with
2,245 additions
and
486 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,6 @@ | ||
--- | ||
"@twilio-paste/page-header": minor | ||
"@twilio-paste/core": minor | ||
--- | ||
|
||
[Page Header] Create new PageHeaderSeparator component as part of the Page Header package |
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 @@ | ||
--- | ||
"@twilio-paste/codemods": patch | ||
--- | ||
|
||
[codemods] add new export to page-header package: PageHeaderSeparator |
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
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
35 changes: 35 additions & 0 deletions
35
packages/paste-core/components/page-header/src/PageHeaderSeparator.tsx
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,35 @@ | ||
import { Box, safelySpreadBoxProps } from "@twilio-paste/box"; | ||
import type { BoxProps } from "@twilio-paste/box"; | ||
import type { HTMLPasteProps } from "@twilio-paste/types"; | ||
import * as React from "react"; | ||
|
||
export interface PageHeaderSeparatorProps extends HTMLPasteProps<"div"> { | ||
children?: React.ReactNode; | ||
/** | ||
* Overrides the default element name to apply unique styles with the Customization Provider | ||
* @default 'PAGE_HEADER_SEPARATOR' | ||
* @type {BoxProps['element']} | ||
* @memberof PageHeaderSeparatorProps | ||
*/ | ||
element?: BoxProps["element"]; | ||
} | ||
|
||
const PageHeaderSeparator = React.forwardRef<HTMLDivElement, PageHeaderSeparatorProps>( | ||
({ element = "PAGE_HEADER_SEPARATOR", children, ...props }, ref) => { | ||
return ( | ||
<Box | ||
{...safelySpreadBoxProps(props)} | ||
ref={ref} | ||
element={element} | ||
gridArea="content_barrier" | ||
marginBottom="space60" | ||
> | ||
{children} | ||
</Box> | ||
); | ||
}, | ||
); | ||
|
||
PageHeaderSeparator.displayName = "PageHeaderSeparator"; | ||
|
||
export { PageHeaderSeparator }; |
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
Oops, something went wrong.