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

[fluent] feat: Add InfoBar and Badge component #97

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

Sanlorng
Copy link
Collaborator

@Sanlorng Sanlorng commented Dec 15, 2024

[fluent] feat: Add InfoBar component

This commit introduces the InfoBar componentan inline message to display app-wide status changes.It provides options to:

  • display a title and message
  • display different severities: informational, success, warning, and critical
  • show or hide an icon and close action button
  • add a custom action button or hyperlink.It supports different background colors, content colors, and icon colors based on the specified severity level.This commit also includes the InfoBarColors class for customising the InfoBar's color scheme and the Severity enum for the different severity level.

image

[fluent] feat: Add Badge component

This commit introduces the Badge component, a non-intrusive UI element for displaying notifications or highlighting areas within an application.

  • It supports different statuses (Informational, InformationalSafe, Caution, Attention, Success, Critical) and allows customization of background color and content.
  • The Badge can be used with or without content, and automatically adjusts its size based on the presence of content.This commit also introduces BadgeDefaults object which provides default colors and icons for different badge statuses.
  • Additionally, it refactors the InfoBar component to use the new Badge and InfoBarSeverity enum for better clarity and consistency.

image

…ar` component, an inline message to display app-wide status changes.It provides options to:

- display a title and message
- display different severities: informational, success, warning, and critical
- show or hide an icon and close action button
- add a custom action button or hyperlink.It supports different background colors, content colors, and icon colors based on the specified severity level.This commit also includes the `InfoBarColors` class for customising the InfoBar's color scheme and the `Severity` enum for the different severity level.
…Screen samples with the following changes:- Sets the secondary sample message to long by default.

- Removes the `fillMaxWidth` modifier from the InfoBar in the secondary sample.
- Removes the `fillMaxWidth` modifier from the InfoBar in the warning sample.
This commit introduces the `Badge` component, a non-intrusive UI element for displaying notifications or highlighting areas within an application.It supports different statuses (Informational, InformationalSafe, Caution, Attention, Success, Critical) and allows customization of background color and content.The `Badge` can be used with or without content, and automatically adjusts its size based on the presence of content.This commit also introduces `BadgeDefaults` object which provides default colors and icons for different badge statuses.Additionally, it refactors the `InfoBar` component to use the new `Badge` and `InfoBarSeverity` enum for better clarity and consistency.
This commit updates the `Badge` component to pass the badge's status to the `content` composable function. This change allows the content of the badge to be customized based on the badge's status, providing more flexibility in how badges are displayed.
This commit adds support for displaying badges on SideNav, TopNav and NavigationView items.
The `SideNavItem`, `TopNavItem` and `MenuItem` composables now accept an optional `badge` parameter, which is a composable function that renders the badge content.This allows developers to easily add badges to navigation items to indicate notifications, updates, or other important information.
@Sanlorng Sanlorng changed the title [fluent] feat: Add InfoBar component [fluent] feat: Add InfoBar and Badge component Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants