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

[EmptyState] Add documentation for onAction prop usage #12882

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TheGreatSimo
Copy link

WHY are these changes introduced?

Updates the documentation to include the onAction prop for the EmptyState component.

While using the EmptyState component, I couldn't find how to handle clicks on the primary button. After checking the source code, I found the onAction prop. I’ve updated the documentation to include onAction so others can find it easily..

Fixes #810 #810

WHAT is this pull request doing?

Adds documentation to clarify how to use the onAction prop in the EmptyState component.
Provides a sample code implementation showing how to handle button actions using onAction.

Before: The onAction prop was available in the EmptyState component, but there was no clear mention in the documentation.
image

After: The documentation now includes examples showing how to use onAction for custom button behavior.
Screenshot from 2024-11-08 02-11-27

How to 🎩

🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines

🎩 checklist

@github-actions github-actions bot added the cla-needed Added by a bot. Contributor needs to sign the CLA Agreement. label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-needed Added by a bot. Contributor needs to sign the CLA Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Polaris Empty state illustration rendering very small
1 participant