Skip to content

Commit 7fe17f3

Browse files
Merge pull request #148 from BuildMirai/dv/icon-docs
Docs: Add documentation for Mirai Icon widget
2 parents 35740f6 + 35ab14e commit 7fe17f3

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

website/docs/widgets/icon.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Icon
2+
3+
The Mirai Icon allows you to build a Flutter icon widget using JSON.
4+
To know more about the icon widget in Flutter, refer to the [official documentation](https://api.flutter.dev/flutter/widgets/Icon-class.html).
5+
6+
## Properties
7+
8+
| Property | Type | Description |
9+
|---------------|------------------|---------------------------------------------------------------------|
10+
| icon | `String` | The name of the icon to display. |
11+
| iconType | `IconType` | The type of the icon (material, cupertino). Defaults to `material`. |
12+
| size | `double?` | The size of the icon. |
13+
| color | `String?` | The color of the icon. |
14+
| semanticLabel | `String?` | The semantic label for the icon. |
15+
| textDirection | `TextDirection?` | The text direction for the icon. |
16+
17+
> Note: To check the available icons, refer to [Icon utils](https://github.com/BuildMirai/mirai/blob/dev/packages/mirai/lib/src/utils/icon_utils.dart).
18+
19+
## Example JSON
20+
21+
```json
22+
{
23+
"type": "icon",
24+
"icon": "home",
25+
"size": 24.0,
26+
"color": "#000000",
27+
"semanticLabel": "Home Icon",
28+
"textDirection": "ltr"
29+
}
30+
```

0 commit comments

Comments
 (0)