From dd0bef5d67691c7b6da518de1dba5caaf0a74125 Mon Sep 17 00:00:00 2001 From: axzilla Date: Tue, 10 Dec 2024 08:24:51 +0700 Subject: [PATCH] feat(button): remove unneccessary button showcase examples --- assets/css/input.css | 30 +++++++++---------- assets/css/output.css | 30 +++++++++---------- internals/ui/pages/button.templ | 12 -------- internals/ui/showcase/button_disabled.templ | 3 +- internals/ui/showcase/button_fullwidth.templ | 10 ------- internals/ui/showcase/button_with_click.templ | 10 ------- 6 files changed, 31 insertions(+), 64 deletions(-) delete mode 100644 internals/ui/showcase/button_fullwidth.templ delete mode 100644 internals/ui/showcase/button_with_click.templ diff --git a/assets/css/input.css b/assets/css/input.css index 23b563a..a8f43ba 100644 --- a/assets/css/input.css +++ b/assets/css/input.css @@ -14,37 +14,37 @@ --card-foreground: 240 10% 3.9%; --border: 240 5.9% 90%; --input: 240 5.9% 90%; - --primary: 346.8 77.2% 49.8%; - --primary-foreground: 355.7 100% 97.3%; + --primary: 240 5.9% 10%; + --primary-foreground: 0 0% 98%; --secondary: 240 4.8% 95.9%; --secondary-foreground: 240 5.9% 10%; --accent: 240 4.8% 95.9%; --accent-foreground: 240 5.9% 10%; --destructive: 0 84.2% 60.2%; --destructive-foreground: 0 0% 98%; - --ring: 346.8 77.2% 49.8%; + --ring: 240 5.9% 10%; --radius: 0.5rem; } .dark { - --background: 20 14.3% 4.1%; - --foreground: 0 0% 95%; - --muted: 0 0% 15%; + --background: 240 10% 3.9%; + --foreground: 0 0% 98%; + --muted: 240 3.7% 15.9%; --muted-foreground: 240 5% 64.9%; - --popover: 0 0% 9%; - --popover-foreground: 0 0% 95%; - --card: 24 9.8% 10%; - --card-foreground: 0 0% 95%; + --popover: 240 10% 3.9%; + --popover-foreground: 0 0% 98%; + --card: 240 10% 3.9%; + --card-foreground: 0 0% 98%; --border: 240 3.7% 15.9%; --input: 240 3.7% 15.9%; - --primary: 346.8 77.2% 49.8%; - --primary-foreground: 355.7 100% 97.3%; + --primary: 0 0% 98%; + --primary-foreground: 240 5.9% 10%; --secondary: 240 3.7% 15.9%; --secondary-foreground: 0 0% 98%; - --accent: 12 6.5% 15.1%; + --accent: 240 3.7% 15.9%; --accent-foreground: 0 0% 98%; --destructive: 0 62.8% 30.6%; - --destructive-foreground: 0 85.7% 97.3%; - --ring: 346.8 77.2% 49.8%; + --destructive-foreground: 0 0% 98%; + --ring: 240 4.9% 83.9%; --radius: 0.5rem; } } diff --git a/assets/css/output.css b/assets/css/output.css index 9bed6e1..769ba39 100644 --- a/assets/css/output.css +++ b/assets/css/output.css @@ -565,38 +565,38 @@ video { --card-foreground: 240 10% 3.9%; --border: 240 5.9% 90%; --input: 240 5.9% 90%; - --primary: 346.8 77.2% 49.8%; - --primary-foreground: 355.7 100% 97.3%; + --primary: 240 5.9% 10%; + --primary-foreground: 0 0% 98%; --secondary: 240 4.8% 95.9%; --secondary-foreground: 240 5.9% 10%; --accent: 240 4.8% 95.9%; --accent-foreground: 240 5.9% 10%; --destructive: 0 84.2% 60.2%; --destructive-foreground: 0 0% 98%; - --ring: 346.8 77.2% 49.8%; + --ring: 240 5.9% 10%; --radius: 0.5rem; } .dark { - --background: 20 14.3% 4.1%; - --foreground: 0 0% 95%; - --muted: 0 0% 15%; + --background: 240 10% 3.9%; + --foreground: 0 0% 98%; + --muted: 240 3.7% 15.9%; --muted-foreground: 240 5% 64.9%; - --popover: 0 0% 9%; - --popover-foreground: 0 0% 95%; - --card: 24 9.8% 10%; - --card-foreground: 0 0% 95%; + --popover: 240 10% 3.9%; + --popover-foreground: 0 0% 98%; + --card: 240 10% 3.9%; + --card-foreground: 0 0% 98%; --border: 240 3.7% 15.9%; --input: 240 3.7% 15.9%; - --primary: 346.8 77.2% 49.8%; - --primary-foreground: 355.7 100% 97.3%; + --primary: 0 0% 98%; + --primary-foreground: 240 5.9% 10%; --secondary: 240 3.7% 15.9%; --secondary-foreground: 0 0% 98%; - --accent: 12 6.5% 15.1%; + --accent: 240 3.7% 15.9%; --accent-foreground: 0 0% 98%; --destructive: 0 62.8% 30.6%; - --destructive-foreground: 0 85.7% 97.3%; - --ring: 346.8 77.2% 49.8%; + --destructive-foreground: 0 0% 98%; + --ring: 240 4.9% 83.9%; --radius: 0.5rem; } diff --git a/internals/ui/pages/button.templ b/internals/ui/pages/button.templ index aa9dc26..b8c73d3 100644 --- a/internals/ui/pages/button.templ +++ b/internals/ui/pages/button.templ @@ -24,18 +24,6 @@ templ Button() { PreviewCodeFile: "button_sizes.templ", ComponentCodeFile: "button.templ", }) - @modules.ExampleWrapper(modules.ExampleWrapperProps{ - SectionName: "Full Width", - ShowcaseFile: showcase.ButtonFullwidth(), - PreviewCodeFile: "button_fullwidth.templ", - ComponentCodeFile: "button.templ", - }) - @modules.ExampleWrapper(modules.ExampleWrapperProps{ - SectionName: "With Click", - ShowcaseFile: showcase.ButtonWithClick(), - PreviewCodeFile: "button_with_click.templ", - ComponentCodeFile: "button.templ", - }) @modules.ExampleWrapper(modules.ExampleWrapperProps{ SectionName: "Disabled", ShowcaseFile: showcase.ButtonDisabled(), diff --git a/internals/ui/showcase/button_disabled.templ b/internals/ui/showcase/button_disabled.templ index 199b23f..83cbd0f 100644 --- a/internals/ui/showcase/button_disabled.templ +++ b/internals/ui/showcase/button_disabled.templ @@ -4,7 +4,6 @@ import "github.com/axzilla/goilerplate/pkg/components" templ ButtonDisabled() {
- @components.Button(components.ButtonProps{Text: "Disabled using props", Disabled: true}) - @components.Button(components.ButtonProps{Text: "Disabled using attributes", Attributes: templ.Attributes{"disabled": "true"}}) + @components.Button(components.ButtonProps{Text: "Disabled", Disabled: true})
} diff --git a/internals/ui/showcase/button_fullwidth.templ b/internals/ui/showcase/button_fullwidth.templ deleted file mode 100644 index eb9e922..0000000 --- a/internals/ui/showcase/button_fullwidth.templ +++ /dev/null @@ -1,10 +0,0 @@ -package showcase - -import "github.com/axzilla/goilerplate/pkg/components" - -templ ButtonFullwidth() { -
- @components.Button(components.ButtonProps{Text: "Full Width using prop", FullWidth: true}) - @components.Button(components.ButtonProps{Text: "Full Width using class", Class: "w-full"}) -
-} diff --git a/internals/ui/showcase/button_with_click.templ b/internals/ui/showcase/button_with_click.templ deleted file mode 100644 index 9ff076c..0000000 --- a/internals/ui/showcase/button_with_click.templ +++ /dev/null @@ -1,10 +0,0 @@ -package showcase - -import "github.com/axzilla/goilerplate/pkg/components" - -templ ButtonWithClick() { -
- @components.Button(components.ButtonProps{Text: "With Alpine.js", Attributes: templ.Attributes{"@click": "alert('Hey Dude!')"}}) - @components.Button(components.ButtonProps{Text: "With Vanilla JS", Attributes: templ.Attributes{"onclick": "alert('Hey Dude!')"}}) -
-}