Skip to content

Commit

Permalink
Add tailwind v4 example (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Code-Monkey committed Apr 1, 2024
1 parent 62d1d5d commit 31ab917
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,28 @@ Let's create a classic `Button` component accepting two props:
}
}
```
```css [CSS + Tailwind V4]
@scope (.button) {
button:scope {
/* Default style */
font-size: theme(fontSize.base);
border-radius: theme(borderRadius.sm);

&[data-size='lg'] {
font-size: theme(fontSize.lg);
}

&[data-size='sm'] {
font-size: theme(fontSize.sm);
}

&[data-danger] {
background-color: theme(colors.red.700);
color: theme(colors.white);
}
}
}
```

:::

Expand Down

0 comments on commit 31ab917

Please sign in to comment.