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(material/tooltip): replicate tooltipClass to default MatTooltipDefaultOptions #29467

Merged
merged 3 commits into from
Jul 22, 2024

Conversation

jullierme
Copy link
Contributor

@jullierme jullierme commented Jul 21, 2024

The tooltipClass property has been added to the default configuration options in MatTooltipDefaultOptions. This new property is optional and supports the same syntax as ngClass, just like the component's default attribute. As with some existing configurations, if a CSS class is defined directly on the tooltip component, it will automatically override the default class. An example has been added to the tooltip-demo file. Additionally, two tests have been created to ensure the solution works as expected.

Fixes #29355

…ipDefaultOptions

The `tooltipClass` property has been added to the default configuration options in
`MatTooltipDefaultOptions`. This new property is optional and supports the same syntax
as `ngClass`, just like the component's default attribute.
As with some existing configurations, if a CSS class is defined directly on the tooltip
component, it will automatically override the default class. An example has been added
to the `tooltip-demo` file. Additionally, two tests have been created to ensure the
solution works as expected.

Fixes angular#29355
@jullierme jullierme requested a review from a team as a code owner July 21, 2024 14:22
@jullierme jullierme requested review from crisbeto and amysorto and removed request for a team July 21, 2024 14:22
@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Jul 21, 2024
@jullierme jullierme changed the title feat(material/form-field): replicate tooltipClass to default MatTooltipDefaultOptions feat(material/tooltip): replicate tooltipClass to default MatTooltipDefaultOptions Jul 21, 2024
src/components-examples/material/tooltip/index.ts Outdated Show resolved Hide resolved
src/material/tooltip/tooltip.ts Outdated Show resolved Hide resolved
…ipDefaultOptions

The `tooltipClass` property has been added to the default configuration options in
`MatTooltipDefaultOptions`. This new property is optional.
As with some existing configurations, if a CSS class is defined directly on the tooltip
component, it will automatically override the default class. Two tests have been created
to ensure the solution works as expected.

Fixes angular#29355
…ipDefaultOptions

The `tooltipClass` property has been added to the default configuration options in
`MatTooltipDefaultOptions`. This new property is optional.
As with some existing configurations, if a CSS class is defined directly on the tooltip
component, it will automatically override the default class. Two tests have been created
to ensure the solution works as expected.

Fixes angular#29355
@jullierme
Copy link
Contributor Author

@crisbeto the changes were made. Again, thanks a lot for reviewing it :)

@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release labels Jul 22, 2024
@crisbeto crisbeto removed the request for review from amysorto July 22, 2024 13:28
@crisbeto crisbeto merged commit a018fb0 into angular:main Jul 22, 2024
12 checks passed
@jullierme jullierme deleted the add-global-mat-tooltip-class branch July 22, 2024 14:21
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(tooltip): allow providing a global matTooltipClass
2 participants