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

[Feature]: react-toast: Access to intent property in Toast component #33473

Open
1 task done
soumyart opened this issue Dec 14, 2024 · 1 comment
Open
1 task done

[Feature]: react-toast: Access to intent property in Toast component #33473

soumyart opened this issue Dec 14, 2024 · 1 comment

Comments

@soumyart
Copy link

soumyart commented Dec 14, 2024

Area

React Components (@fluentui/react-components)

Describe the feature that you would like added

Support intent property in ToastState interface.

Additional context

I'm using FluentUI v9 react components in my projects and following an undocumented approach to customize the components.
In most of the cases I'm using the unstable_ exports from fluentui to compose my own version of fluentui components.
I know FluentUI team might not encourage this approach but I have found this route easy to do granular styles updates.

I need to style the <Toast /> component as per my design teams guideline (below screenshot). I need to have a left side indicator (css ::before) matching the intent property. I was thinking to use useToastStyle to achieve this but realized ToastState passed to useToastStyle doesn't have access to intent property.

Image

Below is a screenshot of my custom Toast component

Image

I can create a PR if required. But first wanted to validate the reason behind not exposing the intent property in ToastState.

Have you discussed this feature with our team

No response

Validations

  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

Priority

High

@layershifter
Copy link
Member

@soumyart I don't think that there is a reason, feel free to submit a PR 👍

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

No branches or pull requests

2 participants