0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 23:18:48 -05:00
penpot/frontend/uxbox/ui/workspace/sidebar.cljs

34 lines
1 KiB
Text
Raw Normal View History

2015-12-28 15:20:16 +02:00
(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]}))