-
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(progress-steps): add ProgressStepsContent (#4065)
* feat(progress-steps): use css for separator * feat(progress-steps): add ProgressStepContent props * feat(progress-steps): remove content prop * feat(progress-steps): add padding bottom to component * feat(progress-steps): update story * feat(progress-steps): update docs site with additonal content example * feat(progress-steps): add changeset * feat(progress-steps): update types * feat(progress-steps): add verticle padding to ProgressStepsContent * feat(progress-steps): add changset for codemods * feat(progress-steps): implement changes from review * feat(progress-steps): change minwidth of separator * feat(progress-steps): update typedocs * feat(progress-steps): fix build issue * feat(progress-steps): add test for progressStepsContent * feat(progress-steps): update typedocs * feat(progress-steps): update package json * feat(progress-steps): update yarn lock * feat(progress-steps): implement changes from review * feat(progress-steps): update typedocs * feat(progress-steps): update typedocs * feat(progress-steps): add ProgressStepSeparator callout * feat(progress-steps): update paddingY comment * feat(progress-steps): update type docs * feat(progress-steps): update type docs * feat(progress-steps): add Timeline vs. Progress Steps * feat(progress-steps): use 10px as margin top for separator * feat(progress-steps): update typedocs
- Loading branch information
1 parent
a84b45b
commit d108aeb
Showing
18 changed files
with
1,985 additions
and
122 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 @@ | ||
--- | ||
"@twilio-paste/codemods": minor | ||
--- | ||
|
||
[Progress Steps] Add `ProgressStepsContent` component to add additional content during vertical orientation |
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/progress-steps": minor | ||
"@twilio-paste/core": minor | ||
--- | ||
|
||
[Progress Steps] Add `ProgressStepsContent` component to add additional content during vertical orientation |
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/progress-steps/src/ProgressStepContent.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, type BoxProps } from "@twilio-paste/box"; | ||
import type { Padding } from "@twilio-paste/style-props"; | ||
import type { HTMLPasteProps } from "@twilio-paste/types"; | ||
import React from "react"; | ||
|
||
export interface ProgressStepContentProps extends HTMLPasteProps<"div"> { | ||
children?: React.ReactNode; | ||
/** | ||
* Overrides the default element name to apply unique styles with the Customization Provider | ||
* | ||
* @default 'PROGRESS_STEP_CONTENT' | ||
* @type {BoxProps['element']} | ||
* @memberof ProgressStepContentProps | ||
*/ | ||
element?: BoxProps["element"]; | ||
/** | ||
* Responsive prop of Space tokens for the CSS `padding-top` and `padding-bottom` properties | ||
* | ||
* @default 'space40' | ||
* @type {Padding} | ||
* @memberof ProgressStepContentProps | ||
*/ | ||
paddingY?: Padding; | ||
} | ||
|
||
export const ProgressStepContent = React.forwardRef<HTMLDivElement, ProgressStepContentProps>( | ||
({ element = "PROGRESS_STEP_CONTENT", paddingY = "space40", ...props }, ref) => { | ||
return ( | ||
<Box element={element} color="colorText" ref={ref} paddingY={paddingY}> | ||
{props.children} | ||
</Box> | ||
); | ||
}, | ||
); | ||
ProgressStepContent.displayName = "ProgressStepContent"; |
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
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
Oops, something went wrong.