[front/ux] add button style

This commit is contained in:
SouthFox 2023-08-26 22:53:00 +08:00
parent 1f1a18cb77
commit 536219b621
2 changed files with 27 additions and 5 deletions

View file

@ -6,3 +6,15 @@
/* Utilities */ /* Utilities */
@import 'tailwindcss/utilities'; @import 'tailwindcss/utilities';
.btn {
@apply font-bold py-2 px-4 rounded;
}
.btn-blue {
@apply bg-blue-500 text-white;
}
.btn-blue:hover {
@apply bg-blue-700;
}

View file

@ -2,14 +2,24 @@
(:require [reitit.frontend.easy :as rfe] (:require [reitit.frontend.easy :as rfe]
[re-frame.core :refer [subscribe]])) [re-frame.core :refer [subscribe]]))
(defn button
[id]
[:div
[:button
{:type "button"
:on-click #(rfe/push-state id)
:class "btn btn-blue"}
"Item " id]
[:br]])
(defn home-page [] (defn home-page []
[:div [:div
:h2 "Home"] [:h2 "Try this!"]
[:button (button 385214753)
{:type "button" (button 96817849)
:on-click #(rfe/push-state :item {:id 431038004})} (button 24425284)
"Item 431038004"]) ])
(defn about-page [] (defn about-page []
[:div [:div