-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add comp-tabs, comp-placeholder; alpha release
- Loading branch information
ChenYong
committed
Jun 22, 2020
1 parent
6902384
commit 8888966
Showing
7 changed files
with
1,125 additions
and
16 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
|
||
(ns respo-ui.comp | ||
(:require [respo.core | ||
:refer | ||
[defcomp div list-> input textarea button span select option a <>]] | ||
[respo.comp.space :refer [=<]] | ||
[respo-ui.core :as ui] | ||
[hsl.core :refer [hsl]])) | ||
|
||
(defcomp | ||
comp-placeholder | ||
(text) | ||
(div | ||
{:style (merge | ||
ui/center | ||
{:padding 16, | ||
:font-family ui/font-fancy, | ||
:color (hsl 0 0 80), | ||
:font-size 12, | ||
:font-style :italic})} | ||
(<> text))) | ||
|
||
(defn comp-sidebar [] ) | ||
|
||
(defcomp | ||
comp-tabs | ||
(options tabs on-route) | ||
(list-> | ||
{:style (merge | ||
(if (:vertical? options) ui/column ui/row) | ||
{:padding "8px 16px 0", :width (:width options)} | ||
(:style options))} | ||
(->> tabs | ||
(map | ||
(fn [info] | ||
[(:name info) | ||
(div | ||
{:style (merge | ||
{:padding "0 8px", | ||
:font-family ui/font-fancy, | ||
:font-weight 300, | ||
:cursor :pointer, | ||
:font-size 16, | ||
:color (hsl 0 0 70), | ||
:line-height "32px"} | ||
(if (= (:selected options) (:name info)) | ||
{:font-weight 500, :color (hsl 0 0 30)})), | ||
:on-click (fn [e d!] (on-route info d!))} | ||
(<> (:title info)))]))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters