0.0.20 • Published 1 year ago

@dadmor/pure-baldr-core v0.0.20

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

PureBaldr Core

TailWind UiKit wrapper core library

Setup

Install

yarn add @dadmor/pure-baldr-core npm install @dadmor/pure-baldr-core

extending tailWind config

theme: {
	extend: {
		colors: {
			/* 'primary' */
			primary: {
          			DEFAULT: "#...",
          			...
        		},
        		secondary: {
          			DEFAULT: "#...",
          			...
        		},
        		tertiary: {
          			DEFAULT: "#...",
          			...
			}
		}
}

PureBaldr conditional classes

The mixClass method conditionally compiles a CSS class string. The directive accepts an array of classes where the array key contains the class or classes you wish to add, while the value is a boolean expression. If the array element has a numeric key, it will always be included in the rendered class list:

<Props>
{
  gapComponentProperties = true,
  className = ""
}
...
className={
	mixClass({
        	flex: true,
        	gap-3: gapComponentProperties,
        	[className]: true,
	})
}

PureBaldr predefined MixClass conditions

PureBaldr Core offer base default class conditions, for example:

<Props>
{
  spacing = "md",
  className = ""
}
...
className={
	mixClass({
		flex: true,
		...gapMix(spacing),
		[className]: true,
	})
}

PureBaldr MixClass list

editable conditions

MixClassValue
gapMixxs,sm,md,lg,xl
paddingxMixxs,sm,md,lg,xl,2xl
paddingyMixxs,sm,md,lg,xl,2xl
paddingbMixxs,sm,md,lg,xl,2xl

coreersponding with tailwind config

MixClassValue
textSizeMixxs,sm, base, md,lg,xl,2xl, 3xl
textWeightMixnormal, bold, upbold
textColorMixprimary, secondary, tertiary, error, success, success-light, warning, warning-light, info, white
borderColorMix..
textHoverColorMix..
bgMix..
bgHoverColorMix..
roundedMixmd, lg, 2xl, full
shadowMixmd, lg, full
transitionMixtrue, false

PureBaldr custom MixClass conditions

TODO

0.0.20

1 year ago

0.0.17

1 year ago

0.0.16

1 year ago

0.0.15

1 year ago

0.0.14

1 year ago

0.0.13

1 year ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago