Skip to content

Commit 26d84c2

Browse files
dcostarasoxalorg
authored andcommitted
.
1 parent 65a6cf7 commit 26d84c2

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
@@ -103,29 +103,28 @@
103103
- `:fonts`: map from keyword to font stack (comman separated string)
104104
- `:components`: sequence of Girouette components, each a map with
105105
`:id` (keyword), `:rules` (string, instaparse, can be omitted), and
106-
`:garden` (map, or function taking instaparse results and returning Garden
107-
map)
106+
`:garden` (map, vector, or function; see below for details)
108107
- `:tw-version`: which Girouette defaults to use, either based on Tailwind
109108
v2, or v3. Valid values: 2, 3.
110109
111110
If `:rules` is omitted we assume this is a static token, and we'll
112111
generate a rule of the form `token-id = <'token-id'>`.
113112
114113
`:garden` can be a function, in which case it receives a map with a
115-
`:compoent-data` key containing the instaparse parse tree. Literal maps or
114+
`:component-data` key containing the instaparse parse tree. Literal maps or
116115
vectors are wrapped in a function, in case the returned Garden is fixed. The
117116
resulting Garden styles are processed again as in `defstyled`, so you can use
118117
other Girouette or other tokens in there as well. Use `[:&]` for returning
119-
multiple tokens/maps/stylesUse `[:&]` for returning multiple
120-
tokens/maps/styles.
118+
multiple tokens/maps/styles.
121119
122120
By default these are added to the Girouette defaults, which are in terms
123-
based on the Tailwind defaults. We still default to v2 (to avoid breaking
124-
changes), but you can opt-in to Tailwind v3 by adding `:tw-version 3`. Use
125-
meta-merge annotations (e.g. `{:colors ^:replace {...}}`) to change that
126-
behaviour."
121+
based on the Tailwind defaults. Use meta-merge annotations (e.g. `{:colors
122+
^:replace {...}}`) to change that behaviour. We still default to v2 (to
123+
avoid breaking changes), but you can opt-in to Tailwind v3 by adding
124+
`:tw-version 3`."
127125
[{:keys [components colors fonts tw-version]
128-
:or {tw-version 2}}]
126+
:or {tw-version 2}
127+
:as configuration}]
129128
(let [{:keys [components colors fonts]}
130129
(meta-merge/meta-merge
131130
(case tw-version

0 commit comments

Comments
 (0)