-
-
Notifications
You must be signed in to change notification settings - Fork 26
feat(components): add Alert component #225
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
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
9ef239d
feat(alert): add baseline implementation
desmondinho a817bde
feat(alert): add styles (may be not complete)
desmondinho 52ad9f3
feat(alert): complete styles
desmondinho bbd49b7
feat(button): add full radius styles
desmondinho 2c55f68
feat(alert): apply styles
desmondinho fcf6137
feat(alert): add close button handler
desmondinho 51ca320
chore(alert): complete XML docs summaries
desmondinho 164eaf8
chore(docs): adjust background colors for preview and toolbar
desmondinho 751f601
chore(components): darken text color for warning flat variant
desmondinho 133e274
chore(alert): styling tweaks
desmondinho 809bebd
feat(docs): add Alert page
desmondinho 6b8d702
chore(alert): add missing close-button slot attribute
desmondinho 5d56bf3
chore(alert): ensure TitleContent takes precedence over Title
desmondinho 5a7169c
docs(alert): add callout regarding Title and TitleContent parameters …
desmondinho 2bde7aa
test(alert): add tests
desmondinho File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
120 changes: 120 additions & 0 deletions
120
docs/LumexUI.Docs.Client/Pages/Components/Alert/Alert.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,120 @@ | ||
| @page "/docs/components/alert" | ||
| @layout DocsContentLayout | ||
|
|
||
| @using LumexUI.Docs.Client.Pages.Components.Alert.PreviewCodes | ||
|
|
||
| <DocsSection Title="Usage"> | ||
| <Usage /> | ||
|
|
||
| <Callout Variant="@CalloutVariant.Info"> | ||
| When both <Code>Title</Code> and <Code>TitleContent</Code> are provided, | ||
| <Code>TitleContent</Code> takes precedence. | ||
| </Callout> | ||
|
|
||
| <DocsSection Title="Radius"> | ||
| <p>Use <Code>Radius</Code> parameter to control the border radius of the alert.</p> | ||
| <Radii /> | ||
| </DocsSection> | ||
|
|
||
| <DocsSection Title="Colors"> | ||
| <p>Use <Code>Color</Code> parameter to set the color of the alert.</p> | ||
| <Colors /> | ||
| </DocsSection> | ||
|
|
||
| <DocsSection Title="Variants"> | ||
| <p>Use <Code>Variant</Code> parameter to change the visual style of the alert.</p> | ||
| <Variants /> | ||
| </DocsSection> | ||
|
|
||
| <DocsSection Title="Custom Icon"> | ||
| <p> | ||
| By default, the alert displays an appropriate icon based on the <Code>Color</Code> parameter. | ||
| Use <Code>Icon</Code> parameter to replace the default icon with a custom one. | ||
| </p> | ||
| <CustomIcon /> | ||
| </DocsSection> | ||
|
|
||
| <DocsSection Title="Hide Icon"> | ||
| <p>Use <Code>HideIcon</Code> parameter to hide the icon entirely.</p> | ||
| <HideIcon /> | ||
| </DocsSection> | ||
|
|
||
| <DocsSection Title="Closeable"> | ||
| <p>Use <Code>Closeable</Code> or <Code>OnClose</Code> parameters to add a close button to dismiss the alert.</p> | ||
| <Closeable /> | ||
| </DocsSection> | ||
|
|
||
| <DocsSection Title="End Content"> | ||
| <p>Use <Code>EndContent</Code> parameter to add additional content at the end of the alert, such as actions.</p> | ||
| <EndContent /> | ||
| </DocsSection> | ||
|
|
||
| <DocsSection Title="Two-way Data Binding"> | ||
| <p> | ||
| Use <Code>@@bind-Visible</Code> directive or <Code>Visible</Code> and <Code>VisibleChanged</Code> | ||
| parameters to manually control alert visibility. | ||
| </p> | ||
| <TwoWayDataBinding /> | ||
| </DocsSection> | ||
| </DocsSection> | ||
|
|
||
| <DocsSection Title="Custom Styles"> | ||
| <div> | ||
| <h4 class="font-semibold">Alert</h4> | ||
| <ul> | ||
| <li><Code>Class</Code>: The CSS class names to style the alert wrapper.</li> | ||
| <li><Code>Classes</Code>: The CSS class names to style the alert slots.</li> | ||
| </ul> | ||
| </div> | ||
| <CustomStyles /> | ||
| </DocsSection> | ||
|
|
||
| <DocsApiSection Components="@_apiComponents" /> | ||
|
|
||
| @code { | ||
| [CascadingParameter] private DocsContentLayout Layout { get; set; } = default!; | ||
|
|
||
| private readonly Heading[] _headings = new Heading[] | ||
| { | ||
| new("Usage", [ | ||
| new("Radius"), | ||
| new("Colors"), | ||
| new("Variants"), | ||
| new("Custom Icon"), | ||
| new("Hide Icon"), | ||
| new("Closeable"), | ||
| new("End Content"), | ||
| new("Two-way Data Binding"), | ||
| ]), | ||
| new("Custom Styles"), | ||
| new("API") | ||
| }; | ||
|
|
||
| private readonly Slot[] _slots = new Slot[] | ||
| { | ||
| new(nameof(AlertSlots.Base), "The base container of the alert component."), | ||
| new(nameof(AlertSlots.MainWrapper), "The wrapper for the alert title and description content."), | ||
| new(nameof(AlertSlots.Title), "The alert title element."), | ||
| new(nameof(AlertSlots.Description), "The alert description element."), | ||
| new(nameof(AlertSlots.CloseButton), "The alert close button element."), | ||
| new(nameof(AlertSlots.IconWrapper), "The wrapper for the alert icon."), | ||
| new(nameof(AlertSlots.Icon), "The alert icon element.") | ||
| }; | ||
|
|
||
| private readonly string[] _apiComponents = new string[] | ||
| { | ||
| nameof(LumexAlert), | ||
| nameof(LumexButton) | ||
| }; | ||
|
|
||
| protected override void OnInitialized() | ||
| { | ||
| Layout.Initialize( | ||
| title: "Alert", | ||
| category: "Components", | ||
| description: "Alerts display concise feedback about an action or event for the user.", | ||
| headings: _headings, | ||
| linksProps: new ComponentLinksProps( "Alert", isServer: false ) | ||
| ); | ||
| } | ||
| } |
23 changes: 23 additions & 0 deletions
23
docs/LumexUI.Docs.Client/Pages/Components/Alert/Examples/Closeable.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| @if( _isVisible ) | ||
| { | ||
| <LumexAlert Title="@title" | ||
| Description="@description" | ||
| Color="@ThemeColor.Success" | ||
| Variant="@AlertVariant.Faded" | ||
| Visible="@_isVisible" | ||
| OnClose="@(() => _isVisible = false)" /> | ||
| } | ||
| else | ||
| { | ||
| <LumexButton Variant="@Variant.Outlined" | ||
| OnClick="@(() => _isVisible = true)"> | ||
| Show alert | ||
| </LumexButton> | ||
| } | ||
|
|
||
| @code { | ||
| private string title = "Success Notification"; | ||
| private string description = "Your action has been completed successfully. We'll notify you when updates are available."; | ||
|
|
||
| private bool _isVisible = true; | ||
| } |
7 changes: 7 additions & 0 deletions
7
docs/LumexUI.Docs.Client/Pages/Components/Alert/Examples/Colors.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| <div class="w-full flex flex-col gap-3"> | ||
| @foreach( var color in Enum.GetValues<ThemeColor>()[1..] ) | ||
| { | ||
| var colorText = color.ToString().ToLower(); | ||
| <LumexAlert Title="@($"This is a `{colorText}` color alert")" Color="@color" /> | ||
| } | ||
| </div> |
3 changes: 3 additions & 0 deletions
3
docs/LumexUI.Docs.Client/Pages/Components/Alert/Examples/CustomIcon.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <LumexAlert Icon="@Icons.Rounded.Favorite"> | ||
| An alert with a custom icon | ||
| </LumexAlert> |
30 changes: 30 additions & 0 deletions
30
docs/LumexUI.Docs.Client/Pages/Components/Alert/Examples/CustomStyles.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| <LumexAlert Description="The documents you requested are ready to be viewed" | ||
| Color="@ThemeColor.Primary" | ||
| Variant="@AlertVariant.Flat" | ||
| Classes="@_classes"> | ||
| <div class="flex items-center gap-2 mt-2"> | ||
| <LumexButton Size="@Size.Small" | ||
| Variant="@Variant.Outlined" | ||
| Class="bg-background text-foreground-700 border shadow-xs"> | ||
| View documents | ||
| </LumexButton> | ||
|
|
||
| <LumexButton Size="@Size.Small" | ||
| Variant="@Variant.Light" | ||
| Class="text-foreground-600"> | ||
| Remind me later | ||
| </LumexButton> | ||
| </div> | ||
| </LumexAlert> | ||
|
|
||
| @code { | ||
| private AlertSlots _classes = new() | ||
| { | ||
| Base = new ElementClass() | ||
| .Add( "relative" ) | ||
| .Add( "shadow-sm" ) | ||
| .Add( "bg-default-50" ) | ||
| .Add( "overflow-hidden" ) | ||
| .Add( "before:absolute before:z-10 before:left-0 before:inset-y-0 before:w-1 before:bg-primary" ) | ||
| }; | ||
| } |
12 changes: 12 additions & 0 deletions
12
docs/LumexUI.Docs.Client/Pages/Components/Alert/Examples/EndContent.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <LumexAlert Title="You have no credits left" | ||
| Description="Upgrade to a paid plan to continue" | ||
| Color="@ThemeColor.Warning" | ||
| Variant="@AlertVariant.Faded"> | ||
| <EndContent> | ||
| <LumexButton Size="@Size.Small" | ||
| Color="@ThemeColor.Warning" | ||
| Variant="@Variant.Flat"> | ||
| Upgrade | ||
| </LumexButton> | ||
| </EndContent> | ||
| </LumexAlert> |
5 changes: 5 additions & 0 deletions
5
docs/LumexUI.Docs.Client/Pages/Components/Alert/Examples/HideIcon.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| <LumexAlert Title="This is an alert" | ||
| Description="Thanks for subscribing to our newsletter!" | ||
| Color="@ThemeColor.Secondary" | ||
| Variant="@AlertVariant.Faded" | ||
| HideIcon="@true" /> |
7 changes: 7 additions & 0 deletions
7
docs/LumexUI.Docs.Client/Pages/Components/Alert/Examples/Radii.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| <div class="w-full flex flex-col gap-3"> | ||
| @foreach( var radius in Enum.GetValues<Radius>() ) | ||
| { | ||
| var radiusText = radius.ToString().ToLower(); | ||
| <LumexAlert Title="@($"This is a `{radiusText}` radius alert")" Radius="@radius" /> | ||
| } | ||
| </div> |
26 changes: 26 additions & 0 deletions
26
docs/LumexUI.Docs.Client/Pages/Components/Alert/Examples/TwoWayDataBinding.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| <div class="w-full flex flex-col gap-2"> | ||
| @if( _isVisible ) | ||
| { | ||
| <LumexAlert Title="This is an alert" | ||
| Description="Thanks for subscribing to our newsletter!" | ||
| Color="@ThemeColor.Info" | ||
| Closeable="@true" | ||
| @bind-Visible="@_isVisible" /> | ||
| } | ||
| else | ||
| { | ||
| <LumexButton Variant="@Variant.Outlined" | ||
| OnClick="@(() => _isVisible = true)" | ||
| Class="w-fit"> | ||
| Show alert | ||
| </LumexButton> | ||
| } | ||
|
|
||
| <p class="text-small text-default-500"> | ||
| Visible: @(_isVisible ? "true" : "false") | ||
| </p> | ||
| </div> | ||
|
|
||
| @code { | ||
| private bool _isVisible = true; | ||
| } |
2 changes: 2 additions & 0 deletions
2
docs/LumexUI.Docs.Client/Pages/Components/Alert/Examples/Usage.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <LumexAlert Title="This is an alert" | ||
| Description="Thanks for subscribing to our newsletter!" /> |
7 changes: 7 additions & 0 deletions
7
docs/LumexUI.Docs.Client/Pages/Components/Alert/Examples/Variants.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| <div class="w-full flex flex-col gap-3"> | ||
| @foreach( var variant in Enum.GetValues<AlertVariant>() ) | ||
| { | ||
| var variantText = variant.ToString().ToLower(); | ||
| <LumexAlert Title="@($"This is a `{variantText}` variant alert")" Variant="@variant" /> | ||
| } | ||
| </div> |
5 changes: 5 additions & 0 deletions
5
docs/LumexUI.Docs.Client/Pages/Components/Alert/PreviewCodes/Closeable.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| @rendermode InteractiveWebAssembly | ||
|
|
||
| <PreviewCode Code="@new( name: null, snippet: "Alert.Code.Closeable" )"> | ||
| <LumexUI.Docs.Client.Pages.Components.Alert.Examples.Closeable /> | ||
| </PreviewCode> |
5 changes: 5 additions & 0 deletions
5
docs/LumexUI.Docs.Client/Pages/Components/Alert/PreviewCodes/Colors.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| @rendermode InteractiveWebAssembly | ||
|
|
||
| <PreviewCode Code="@new( name: null, snippet: "Alert.Code.Colors" )"> | ||
| <LumexUI.Docs.Client.Pages.Components.Alert.Examples.Colors /> | ||
| </PreviewCode> |
5 changes: 5 additions & 0 deletions
5
docs/LumexUI.Docs.Client/Pages/Components/Alert/PreviewCodes/CustomIcon.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| @rendermode InteractiveWebAssembly | ||
|
|
||
| <PreviewCode Code="@new( name: null, snippet: "Alert.Code.CustomIcon" )"> | ||
| <LumexUI.Docs.Client.Pages.Components.Alert.Examples.CustomIcon /> | ||
| </PreviewCode> |
5 changes: 5 additions & 0 deletions
5
docs/LumexUI.Docs.Client/Pages/Components/Alert/PreviewCodes/CustomStyles.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| @rendermode InteractiveWebAssembly | ||
|
|
||
| <PreviewCode Code="@new( name: null, snippet: "Alert.Code.CustomStyles" )"> | ||
| <LumexUI.Docs.Client.Pages.Components.Alert.Examples.CustomStyles /> | ||
| </PreviewCode> |
5 changes: 5 additions & 0 deletions
5
docs/LumexUI.Docs.Client/Pages/Components/Alert/PreviewCodes/EndContent.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| @rendermode InteractiveWebAssembly | ||
|
|
||
| <PreviewCode Code="@new( name: null, snippet: "Alert.Code.EndContent" )"> | ||
| <LumexUI.Docs.Client.Pages.Components.Alert.Examples.EndContent /> | ||
| </PreviewCode> |
5 changes: 5 additions & 0 deletions
5
docs/LumexUI.Docs.Client/Pages/Components/Alert/PreviewCodes/HideIcon.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| @rendermode InteractiveWebAssembly | ||
|
|
||
| <PreviewCode Code="@new( name: null, snippet: "Alert.Code.HideIcon" )"> | ||
| <LumexUI.Docs.Client.Pages.Components.Alert.Examples.HideIcon /> | ||
| </PreviewCode> |
5 changes: 5 additions & 0 deletions
5
docs/LumexUI.Docs.Client/Pages/Components/Alert/PreviewCodes/Radii.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| @rendermode InteractiveWebAssembly | ||
|
|
||
| <PreviewCode Code="@new( name: null, snippet: "Alert.Code.Radii" )"> | ||
| <LumexUI.Docs.Client.Pages.Components.Alert.Examples.Radii /> | ||
| </PreviewCode> |
5 changes: 5 additions & 0 deletions
5
docs/LumexUI.Docs.Client/Pages/Components/Alert/PreviewCodes/TwoWayDataBinding.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| @rendermode InteractiveWebAssembly | ||
|
|
||
| <PreviewCode Code="@new( name: null, snippet: "Alert.Code.TwoWayDataBinding" )"> | ||
| <LumexUI.Docs.Client.Pages.Components.Alert.Examples.TwoWayDataBinding /> | ||
| </PreviewCode> |
5 changes: 5 additions & 0 deletions
5
docs/LumexUI.Docs.Client/Pages/Components/Alert/PreviewCodes/Usage.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| @rendermode InteractiveWebAssembly | ||
|
|
||
| <PreviewCode Code="@new( name: null, snippet: "Alert.Code.Usage" )"> | ||
| <LumexUI.Docs.Client.Pages.Components.Alert.Examples.Usage /> | ||
| </PreviewCode> |
5 changes: 5 additions & 0 deletions
5
docs/LumexUI.Docs.Client/Pages/Components/Alert/PreviewCodes/Variants.razor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| @rendermode InteractiveWebAssembly | ||
|
|
||
| <PreviewCode Code="@new( name: null, snippet: "Alert.Code.Variants" )"> | ||
| <LumexUI.Docs.Client.Pages.Components.Alert.Examples.Variants /> | ||
| </PreviewCode> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| // Copyright (c) LumexUI 2024 | ||
| // LumexUI licenses this file to you under the MIT license | ||
| // See the license here https://github.com/LumexUI/lumexui/blob/main/LICENSE | ||
|
|
||
| namespace LumexUI.Common; | ||
|
|
||
| /// <summary> | ||
| /// Specifies the visual variants for the <see cref="LumexAlert"/>. | ||
| /// </summary> | ||
| public enum AlertVariant | ||
| { | ||
| /// <summary> | ||
| /// A solid alert with a filled background. | ||
| /// </summary> | ||
| Solid, | ||
|
|
||
| /// <summary> | ||
| /// An alert with an outlined border. | ||
| /// </summary> | ||
| Outlined, | ||
|
|
||
| /// <summary> | ||
| /// An alert with a flat background. | ||
| /// </summary> | ||
| Flat, | ||
|
|
||
| /// <summary> | ||
| /// An alert with a flat background and subtle border. | ||
| /// </summary> | ||
| Faded | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.