Skip to content

Commit

Permalink
docs: update button docs to child from text
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaeyx authored Nov 17, 2024
1 parent 9cdf9c9 commit b2febda
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions docs/src/content/docs/Components/button.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Displays a button or a component that looks like a button.
<Preview src="https://shadcn-ui-playground.pages.dev/button?style=primary">
```dart
ShadButton(
text: const Text('Primary'),
child: const Text('Primary'),
onPressed: () {},
)
```
Expand All @@ -23,7 +23,7 @@ ShadButton(
<Preview src="https://shadcn-ui-playground.pages.dev/button?style=secondary">
```dart
ShadButton.secondary(
text: const Text('Secondary'),
child: const Text('Secondary'),
onPressed: () {},
)
```
Expand All @@ -34,7 +34,7 @@ ShadButton.secondary(
<Preview src="https://shadcn-ui-playground.pages.dev/button?style=destructive">
```dart
ShadButton.destructive(
text: const Text('Destructive'),
child: const Text('Destructive'),
onPressed: () {},
)
```
Expand All @@ -45,7 +45,7 @@ ShadButton.destructive(
<Preview src="https://shadcn-ui-playground.pages.dev/button?style=outline">
```dart
ShadButton.outline(
text: const Text('Outline'),
child: const Text('Outline'),
onPressed: () {},
)
```
Expand All @@ -56,7 +56,7 @@ ShadButton.outline(
<Preview src="https://shadcn-ui-playground.pages.dev/button?style=ghost">
```dart
ShadButton.ghost(
text: const Text('Ghost'),
child: const Text('Ghost'),
onPressed: () {},
)
```
Expand All @@ -67,7 +67,7 @@ ShadButton.ghost(
<Preview src="https://shadcn-ui-playground.pages.dev/button?style=link">
```dart
ShadButton.link(
text: const Text('Link'),
child: const Text('Link'),
onPressed: () {},
)
```
Expand All @@ -93,7 +93,7 @@ ShadButton.outline(
```dart
ShadButton(
onPressed: () {},
text: const Text('Login with Email'),
child: const Text('Login with Email'),
icon: Icon(
Icons.mail_outlined,
size: 16,
Expand All @@ -108,7 +108,7 @@ ShadButton(
```dart
ShadButton(
onPressed: () {},
text: const Text('Please wait'),
child: const Text('Please wait'),
icon: SizedBox.square(
dimension: 16,
child: CircularProgressIndicator(strokeWidth: 2),
Expand All @@ -135,7 +135,7 @@ ShadButton(
offset: const Offset(0, 2),
),
],
text: const Text('Gradient with Shadow'),
child: const Text('Gradient with Shadow'),
)
```
</Preview>

0 comments on commit b2febda

Please sign in to comment.