-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
default_api.cljc
65 lines (58 loc) · 2.39 KB
/
default_api.cljc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
(ns girouette.tw.default-api
(:require
[girouette.tw.core :as gtw]
[girouette.version :as version]
[girouette.tw.common :as common]
[girouette.tw.color :as color]
[girouette.tw.layout :as layout]
[girouette.tw.flexbox :as flexbox]
[girouette.tw.grid :as grid]
[girouette.tw.box-alignment :as box-alignment]
[girouette.tw.spacing :as spacing]
[girouette.tw.sizing :as sizing]
[girouette.tw.typography :as typography]
[girouette.tw.background :as background]
[girouette.tw.border :as border]
[girouette.tw.effect :as effect]
[girouette.tw.filter :as filter]
[girouette.tw.table :as table]
[girouette.tw.animation :as animation]
[girouette.tw.transform :as transform]
[girouette.tw.interactivity :as interactivity]
[girouette.tw.svg :as svg]
[girouette.tw.accessibility :as accessibility]))
(def all-tw-components
[common/components
layout/components
flexbox/components
grid/components
box-alignment/components
spacing/components
sizing/components
typography/components
background/components
border/components
effect/components
filter/components
table/components
animation/components
transform/components
interactivity/components
svg/components
accessibility/components])
;; The API built using the Tailwind v2 components.
(let [{:keys [parser class-name->garden]} (-> all-tw-components
(version/filter-components-by-version [:tw 2])
(gtw/make-api {:color-map color/tw-v2-colors
:font-family-map typography/tw-v2-font-family-map}))]
(def tw-v2-parser parser)
(def tw-v2-class-name->garden class-name->garden))
;; The API built using the Tailwind v3 components.
(let [{:keys [parser class-name->garden]} (-> all-tw-components
(version/filter-components-by-version [:tw 3])
(gtw/make-api {:color-map color/tw-v3-unified-colors-extended
:font-family-map typography/tw-v2-font-family-map}))]
(def tw-v3-parser parser)
(def tw-v3-class-name->garden class-name->garden))
;; Feel free to fork the snippet above and add your own components,
;; as that's what Girouette was made for: customization.