mirror of
https://github.com/penpot/penpot.git
synced 2025-01-23 15:09:10 -05:00
33 lines
1 KiB
Clojure
33 lines
1 KiB
Clojure
(ns uxbox.ui.workspace.sidebar
|
|
(:require [sablono.core :as html :refer-macros [html]]
|
|
[rum.core :as rum]
|
|
[uxbox.router :as r]
|
|
[uxbox.rstore :as rs]
|
|
[uxbox.ui.mixins :as mx]
|
|
[uxbox.ui.util :as util]
|
|
[uxbox.ui.workspace.base :as wb]
|
|
[uxbox.ui.workspace.toolboxes :as toolboxes]))
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;; Aside
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
(defn aside-render
|
|
[own]
|
|
(let [workspace (rum/react wb/workspace-state)]
|
|
(html
|
|
[:aside#settings-bar.settings-bar
|
|
[:div.settings-bar-inside
|
|
(when (:draw-toolbox-enabled workspace false)
|
|
(toolboxes/draw-tools))
|
|
(when (:icons-toolbox-enabled workspace false)
|
|
(toolboxes/icons))
|
|
(when (:layers-toolbox-enabled workspace false)
|
|
(toolboxes/layers))]])))
|
|
|
|
(def aside
|
|
(util/component
|
|
{:render aside-render
|
|
:name "aside"
|
|
:mixins [rum/reactive]}))
|
|
|