MCPcopy
hub / github.com/tailwindlabs/tailwindcss / staticUtility

Function staticUtility

packages/tailwindcss/src/utilities.ts:372–378  ·  packages/tailwindcss/src/utilities.ts::staticUtility

* Register a static utility class like `justify-center`.

(className: string, declarations: ([string, string] | (() => AstNode))[])

Source from the content-addressed store, hash-verified

370 * Register a static utility class like `justify-center`.
371 */
372 function staticUtility(className: string, declarations: ([string, string] | (() => AstNode))[]) {
373 utilities.static(className, () => {
374 return declarations.map((node) => {
375 return typeof node === class="st">'function' ? node() : decl(node[0], node[1])
376 })
377 })
378 }
379
380 type UtilityDescription = {
381 supportsNegative?: boolean

Callers 1

createUtilitiesFunction · 0.85

Calls 2

declFunction · 0.90
staticMethod · 0.45

Tested by

no test coverage detected