reagent

A minimalistic ClojureScript interface to React.js http://reagent-project.github.io/
Shantanu Kumar 2021-06-30T21:42:08.140600Z

Hi, does anybody have pointers (or code sample) on how to integrate Reagent with a Material-UI theme? https://material-ui.com/store/

vanelsas 2021-07-01T07:59:45.142500Z

Not sure what you are looking for? Here is a small example of a view that uses 2 elements from material-ui

vanelsas 2021-07-01T07:59:52.142700Z

(ns example
  (:require [reagent.core :as r]
            [reagent-material-ui.core.icon-button :refer [icon-button]]
            [reagent-material-ui.icons.close :refer [close]]))

(defn clicked []
  (println "I was clicked")
)

(defn label-view [name]
  [:div {:style {:display "flex" :flex-direction "row" :background-color "green" :border-radius 3 :margin-right 5 :height 30
                 :border-style "solid" :border-color color/app-background-color :border-width 1}}
   [:label {:style {:color color/app-background-color :margin-left 5 :font-size 14}} name]
   [:div {:style {:margin-left 0 :margin-top 0 :width 20 :height 20}}
    [icon-button {:style {:size "small" :position "relative" :top -10 :left -10}
                  :on-click #(clicked)}
     [close {:style {:font-size 15 :font-weight "bold"}}]]]])

vanelsas 2021-07-01T08:14:30.142900Z

hmm, was a bit quick there. Just realised you were looking more for a theme example.