mirror of
https://github.com/penpot/penpot.git
synced 2025-02-26 16:56:11 -05:00
Use new components macros for sidebar ns.
This commit is contained in:
parent
c293427752
commit
3ab79eb247
1 changed files with 25 additions and 42 deletions
|
@ -6,9 +6,7 @@
|
|||
;; Copyright (c) 2015-2016 Juan de la Cruz <delacruzgarciajuan@gmail.com>
|
||||
|
||||
(ns uxbox.main.ui.workspace.sidebar
|
||||
(:require [sablono.core :as html :refer-macros [html]]
|
||||
[rum.core :as rum]
|
||||
[lentes.core :as l]
|
||||
(:require [lentes.core :as l]
|
||||
[uxbox.main.state :as st]
|
||||
[uxbox.util.router :as r]
|
||||
[uxbox.util.rstore :as rs]
|
||||
|
@ -21,14 +19,12 @@
|
|||
[uxbox.main.ui.workspace.sidebar.icons :refer (icons-toolbox)]
|
||||
[uxbox.main.ui.workspace.sidebar.drawtools :refer (draw-toolbox)]))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Left Sidebar
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; --- Left Sidebar (Component)
|
||||
|
||||
(defn left-sidebar-render
|
||||
[own]
|
||||
(mx/defc left-sidebar
|
||||
{:mixins [mx/reactive mx/static]}
|
||||
[]
|
||||
(let [flags (mx/react wb/flags-ref)]
|
||||
(html
|
||||
[:aside#settings-bar.settings-bar.settings-bar-left
|
||||
[:div.settings-bar-inside
|
||||
(when (contains? flags :sitemap)
|
||||
|
@ -36,22 +32,14 @@
|
|||
(when (contains? flags :document-history)
|
||||
(history-toolbox))
|
||||
(when (contains? flags :layers)
|
||||
(layers-toolbox))]])))
|
||||
(layers-toolbox))]]))
|
||||
|
||||
(def left-sidebar
|
||||
(mx/component
|
||||
{:render left-sidebar-render
|
||||
:name "left-sidebar"
|
||||
:mixins [mx/reactive mx/static]}))
|
||||
;; --- Right Sidebar (Component)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Right Sidebar
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defn right-sidebar-render
|
||||
[own]
|
||||
(mx/defc right-sidebar
|
||||
{:mixins [mx/reactive mx/static]}
|
||||
[]
|
||||
(let [flags (mx/react wb/flags-ref)]
|
||||
(html
|
||||
[:aside#settings-bar.settings-bar
|
||||
[:div.settings-bar-inside
|
||||
(when (contains? flags :drawtools)
|
||||
|
@ -59,10 +47,5 @@
|
|||
(when (contains? flags :element-options)
|
||||
(options-toolbox))
|
||||
(when (contains? flags :icons)
|
||||
(icons-toolbox))]])))
|
||||
(icons-toolbox))]]))
|
||||
|
||||
(def right-sidebar
|
||||
(mx/component
|
||||
{:render right-sidebar-render
|
||||
:name "right-sidebar"
|
||||
:mixins [mx/reactive mx/static]}))
|
||||
|
|
Loading…
Add table
Reference in a new issue