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

feat(ProgressStepper): updating description prop to ReactNode #8017

Merged
merged 2 commits into from
Sep 21, 2022
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface ProgressStepProps
/** Custom icon of a progress step. Will override default icons provided by the variant. */
icon?: React.ReactNode;
/** Description text of a progress step. */
description?: string;
description?: React.ReactNode;
/** ID of the title of the progress step. */
titleId?: string;
/** Accessible label for the progress step. Should communicate all information being communicated by the progress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ export const ProgressStepperBasicWithDescription: React.FunctionComponent = () =
<ProgressStep
variant="info"
isCurrent
description="This is the second thing to happen"
description={
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Three is no need to update the example. If you want to add a test to verify the change that is fine. I do not think that is necessary though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good! I'll revert the example back and add a test. Thanks @thatblindgeye and @tlabaj !!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tlabaj it appears that there's no way to test <br /> through react testing according to testing-library/dom-testing-library#750

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is ok. It is not really a necessary test.

<>
This is the second thing to happen
<br />
In progress
</>
}
thatblindgeye marked this conversation as resolved.
Show resolved Hide resolved
id="basic-desc-step2"
titleId="basic-desc-step2-title"
aria-label="step with info"
Expand Down