Skip to content

Commit

Permalink
Readme Update For
Browse files Browse the repository at this point in the history
- hextorgb
- hextorgba
- pxtoem
- pxtorem
  • Loading branch information
heyjul3s committed Feb 15, 2021
1 parent 18c8469 commit 158d4cf
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 8 deletions.
28 changes: 28 additions & 0 deletions packages/hextorgb/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
# `@artifak/hextorgb`

A utility function to convert hexadecimal colour values to RGB string.

## Installation

### Yarn

```sh
yarn add @artifak/hextorgb
```

### NPM

```sh
npm install @artifak/hextorgb
```

## Usage

```ts
import { hexToRGB } from 'artifak';
import styled from 'styled-components';

export const Container = styled.div`
margin: 0 auto;
width: 100%;
background: #000;
color: ${hexToRGB('#FFF')};
`;
```
28 changes: 28 additions & 0 deletions packages/hextorgba/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
# `@artifak/hextorgba`

A utility function to convert hexadecimal colour values to RGBA string.

## Installation

### Yarn

```sh
yarn add @artifak/hextorgb
```

### NPM

```sh
npm install @artifak/hextorgb
```

## Usage

```ts
import { hexToRGBA } from 'artifak';
import styled from 'styled-components';

export const Container = styled.div`
margin: 0 auto;
width: 100%;
background: #000;
color: ${hexToRGBA('#FFF', 0.75)};
`;
```
29 changes: 25 additions & 4 deletions packages/pxtoem/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
# `@artifak/pxtoem`

> TODO: description
A utility function to convert px values to em.

## Usage
## Installation

### Yarn

```sh
yarn add @artifak/pxtoem
```

### NPM

```sh
npm install @artifak/pxtoem
```
const pxtoem = require('@artifak/pxtoem');

// TODO: DEMONSTRATE API
## Usage

```ts
import { pxToEm } from 'artifak';
import styled from 'styled-components';

export const Container = styled.div`
margin: 0 auto;
width: 100%;
background: #000;
padding-left: ${pxToEm('16px')};
padding-right: ${pxToEm('16px')};
`;
```
28 changes: 24 additions & 4 deletions packages/pxtorem/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
# `@artifak/pxtorem`

> TODO: description
A utility function to convert px values to rem.

## Usage
## Installation

### Yarn

```sh
yarn add @artifak/pxtorem
```

### NPM

```sh
npm install @artifak/pxtorem
```
const pxtorem = require('@artifak/pxtorem');

// TODO: DEMONSTRATE API
## Usage

```ts
import { pxToRem } from 'artifak';
import styled from 'styled-components';

export const Container = styled.div`
margin: 0 auto;
width: 100%;
background: #000;
font-size: ${pxToRem('48px')};
`;
```

0 comments on commit 158d4cf

Please sign in to comment.