Primary action
Used for the main action in a page section or modal footer.
@ui.Button(ui.ButtonProps{
+Default solid action
Used for the main action in a page section or modal footer.
@ui.Button(ui.ButtonProps{
Label: "Nouveau projet",
- Variant: ui.ButtonVariantPrimary,
+ Variant: ui.ButtonVariantDefault,
Size: ui.SizeMD,
Type: "button",
-})
Danger action
Used for irreversible actions after explicit confirmation.
@ui.Button(ui.ButtonProps{
+})
Soft warning action
Used for inline actions that need emphasis without the weight of a solid button.
@ui.Button(ui.ButtonProps{
+ Label: "Relancer",
+ Variant: ui.ButtonVariantWarning,
+ Tone: ui.ButtonToneSoft,
+ Size: ui.SizeMD,
+ Type: "button",
+})
Soft danger action
Used for irreversible actions after explicit confirmation.
@ui.Button(ui.ButtonProps{
Label: "Supprimer",
Variant: ui.ButtonVariantDanger,
+ Tone: ui.ButtonToneSoft,
Size: ui.SizeLG,
Type: "submit",
})
diff --git a/docs/design-system/empty-states.html b/docs/design-system/empty-states.html
index d8cb259..6d27b37 100644
--- a/docs/design-system/empty-states.html
+++ b/docs/design-system/empty-states.html
@@ -8,7 +8,7 @@
-Centered empty state
Used when a list has no rows yet and the next action should stay obvious.
Aucun projet trouvé
Créez votre premier projet
@ui.EmptyState(ui.EmptyStateProps{
+Centered empty state
Used when a list has no rows yet and the next action should stay obvious.
Aucun projet trouvé
Créez votre premier projet
@ui.EmptyState(ui.EmptyStateProps{
Title: "Aucun projet trouvé",
Description: "Créez votre premier projet",
Icon: ui.UIIcon("grid3x3"),
diff --git a/docs/design-system/modals.html b/docs/design-system/modals.html
index 91f74cd..dffde7f 100644
--- a/docs/design-system/modals.html
+++ b/docs/design-system/modals.html
@@ -8,7 +8,7 @@
-Create modal
Shared modal shell with a form body and action footer.
@ui.Modal(ui.ModalProps{
+Create modal
Shared modal shell with a form body and action footer.
@ui.Modal(ui.ModalProps{
Title: "Créer un projet",
Body: ui.FormField(...),
Actions: ui.Button(...),
diff --git a/go-backend/internal/web/handlers/tablos_test.go b/go-backend/internal/web/handlers/tablos_test.go
index d520392..a23657c 100644
--- a/go-backend/internal/web/handlers/tablos_test.go
+++ b/go-backend/internal/web/handlers/tablos_test.go
@@ -237,7 +237,7 @@ func TestGetTablosPageUsesSharedToolbarButtonAndStatusBadge(t *testing.T) {
body := rec.Body.String()
for _, want := range []string{
- `ui-button ui-button-primary ui-button-md`,
+ `ui-button ui-button-solid ui-button-default ui-button-md`,
`ui-badge ui-badge-warning`,
} {
if !strings.Contains(body, want) {
diff --git a/go-backend/internal/web/ui/button.templ b/go-backend/internal/web/ui/button.templ
index 90d7fb6..cc23ce2 100644
--- a/go-backend/internal/web/ui/button.templ
+++ b/go-backend/internal/web/ui/button.templ
@@ -3,6 +3,7 @@ package ui
type ButtonProps struct {
Label string
Variant ButtonVariant
+ Tone ButtonTone
Size Size
Type string
Icon string
@@ -10,7 +11,7 @@ type ButtonProps struct {
}
templ Button(props ButtonProps) {
-