0.2.0 • Published 9 months ago

@djx/text v0.2.0

Weekly downloads
67
License
ISC
Repository
-
Last release
9 months ago

@djx/text

A text component to simplify the styling process

Installation

npm install --save @djx/text

Usage

Make sure you import the component somewehere in your application first:

import '@djx/text';

You can then use it like normal web components in your markup:

<djx-text preset="h1">
  <h1>Headline 1</h1>
</djx-text>

<djx-text size="lg" perks="arial bold upper">
  <h2>Headline 1</h2>
</djx-text>

To define perks, presets and sizes, you simply define the required build-time variables:

DJX_TEXT = {
  "sizes": {
    "xs": [ 12, 14 ],
    "md": [ 14, 18 ]
  },
  "perks": {
    "arial": {
      "font-family": "Arial"
    },
    "bold": {
      "font-weight": "bold"
    },
    "upper": {
      "text-transform": "uppercase"
    }
  },
  "presets": {
    "h1": {
      "size": "xl1",
      "perks": ["arial", "bold", "upper"]
    }
  }
}

Variables

NameDescriptionDefault
DJX_TEXT.sizesA map of sizes{}
DJX_TEXT.perksA map of perks{}
DJX_TEXT.presetsA map of presets{}

For more variables see here

0.2.0

9 months ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.2

2 years ago

0.1.0

3 years ago

0.1.1

2 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago