-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
85 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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,64 @@ | ||
import { Tabs } from 'nextra/components'; | ||
import { Widget } from "../../components/widget"; | ||
|
||
# Alert | ||
Displays a callout for user attention. | ||
|
||
<Tabs items={['Preview', 'Code']}> | ||
<Tabs.Tab> | ||
<Widget name='alert' query={{}}/> | ||
</Tabs.Tab> | ||
<Tabs.Tab> | ||
```dart | ||
FAlert( | ||
title: const Text('Heads Up!'), | ||
subtitle: const Text('You can add components to your app using the cli.'), | ||
), | ||
``` | ||
</Tabs.Tab> | ||
</Tabs> | ||
|
||
## Usage | ||
|
||
### `FAlert(...)` | ||
|
||
```dart | ||
FAlert( | ||
icon: FAssets.icons.badgeAlert, | ||
title: const Text('Heads Up!'), | ||
subtitle: const Text('You can add components to your app using the cli.'), | ||
), | ||
``` | ||
|
||
## Examples | ||
|
||
### Primary | ||
<Tabs items={['Preview', 'Code']}> | ||
<Tabs.Tab> | ||
<Widget name='alert' query={{}}/> | ||
</Tabs.Tab> | ||
<Tabs.Tab> | ||
```dart | ||
FAlert( | ||
title: const Text('Heads Up!'), | ||
subtitle: const Text('You can add components to your app using the cli.'), | ||
), | ||
``` | ||
</Tabs.Tab> | ||
</Tabs> | ||
|
||
### Destructive | ||
<Tabs items={['Preview', 'Code']}> | ||
<Tabs.Tab> | ||
<Widget name='alert' query={{style: 'destructive'}}/> | ||
</Tabs.Tab> | ||
<Tabs.Tab> | ||
```dart | ||
FAlert( | ||
title: const Text('Heads Up!'), | ||
subtitle: const Text('You can add components to your app using the cli.'), | ||
style: FAlertStyle.destructive, | ||
), | ||
``` | ||
</Tabs.Tab> | ||
</Tabs> |
This file contains 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 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 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 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