Skip to content

feat(customContent): Add customFooter to ErrorState #90

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

Merged
merged 2 commits into from
Jan 16, 2024

Conversation

fhlavac
Copy link
Collaborator

@fhlavac fhlavac commented Jan 16, 2024

closes #91

Snímek obrazovky 2024-01-16 v 15 31 20

Added custom footer option to ErrorState

@fhlavac fhlavac requested review from dlabaj and Hyperkid123 January 16, 2024 14:32
@fhlavac fhlavac assigned karelhala and unassigned karelhala Jan 16, 2024
@fhlavac fhlavac requested a review from karelhala January 16, 2024 14:56
Copy link
Collaborator

@karelhala karelhala left a comment

Choose a reason for hiding this comment

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

Looking good, just a random console log.

import ErrorState from "@patternfly/react-component-groups/dist/dynamic/ErrorState";

// eslint-disable-next-line no-console
export const BasicExample: React.FunctionComponent = () => <ErrorState errorTitle='Sample error title' errorDescription='Sample error description' customFooter={<Button variant="secondary" onClick={() => console.log("Custom button clicked")}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we want to block the onClick and console log the "button clicked?"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's an example for the docs

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, yeah! Feel free to merge!

@fhlavac fhlavac merged commit 221c94d into patternfly:main Jan 16, 2024
@fhlavac fhlavac deleted the custom-footer branch January 16, 2024 14:58
Copy link

🎉 This PR is included in version 5.1.0-prerelease.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Enable custom actions in ErrorState
2 participants