Skip to content

Commit 884ef87

Browse files
dcostarasoxalorg
authored andcommitted
.
1 parent 12f843e commit 884ef87

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/lambdaisland/ornament.cljc

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,29 +88,28 @@
8888
- `:fonts`: map from keyword to font stack (comman separated string)
8989
- `:components`: sequence of Girouette components, each a map with
9090
`:id` (keyword), `:rules` (string, instaparse, can be omitted), and
91-
`:garden` (map, or function taking instaparse results and returning Garden
92-
map)
91+
`:garden` (map, vector, or function; see below for details)
9392
- `:tw-version`: which Girouette defaults to use, either based on Tailwind
9493
v2, or v3. Valid values: 2, 3.
9594
9695
If `:rules` is omitted we assume this is a static token, and we'll
9796
generate a rule of the form `token-id = <'token-id'>`.
9897
9998
`:garden` can be a function, in which case it receives a map with a
100-
`:compoent-data` key containing the instaparse parse tree. Literal maps or
99+
`:component-data` key containing the instaparse parse tree. Literal maps or
101100
vectors are wrapped in a function, in case the returned Garden is fixed. The
102101
resulting Garden styles are processed again as in `defstyled`, so you can use
103102
other Girouette or other tokens in there as well. Use `[:&]` for returning
104-
multiple tokens/maps/stylesUse `[:&]` for returning multiple
105-
tokens/maps/styles.
103+
multiple tokens/maps/styles.
106104
107105
By default these are added to the Girouette defaults, which are in terms
108-
based on the Tailwind defaults. We still default to v2 (to avoid breaking
109-
changes), but you can opt-in to Tailwind v3 by adding `:tw-version 3`. Use
110-
meta-merge annotations (e.g. `{:colors ^:replace {...}}`) to change that
111-
behaviour."
106+
based on the Tailwind defaults. Use meta-merge annotations (e.g. `{:colors
107+
^:replace {...}}`) to change that behaviour. We still default to v2 (to
108+
avoid breaking changes), but you can opt-in to Tailwind v3 by adding
109+
`:tw-version 3`."
112110
[{:keys [components colors fonts tw-version]
113-
:or {tw-version 2}}]
111+
:or {tw-version 2}
112+
:as configuration}]
114113
(let [{:keys [components colors fonts]}
115114
(meta-merge/meta-merge
116115
(case tw-version

0 commit comments

Comments
 (0)