Skip to content

Commit c8b0d2e

Browse files
author
Ibrahim Odev
committed
Update README.md
1 parent 224f7d3 commit c8b0d2e

File tree

1 file changed

+23
-19
lines changed

1 file changed

+23
-19
lines changed

README.md

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,37 @@
1-
![tailwind](https://i.hizliresim.com/abke1nw.png)
1+
![tailwind](https://i.hizliresim.com/q9dulw0.png)
22

33
### Next.js + tailwind.config.js usage example.
44

55
```js
6-
const getPalette = require("tailwindcss-palette-generator");
6+
/** @type {import('tailwindcss').Config} */
7+
import getPalette from "tailwindcss-palette-generator";
78

89
const palette = getPalette([
910
{
10-
color: "rgb(255, 189, 0)", // required
11-
name: "primary", // required
12-
shade: 400
11+
color: "#264653",
12+
name: "primary"
1313
},
1414
{
15-
color: "rgba(255, 189, 0, 1)", // required
16-
name: "secondary", // required
17-
shade: 500
15+
color: "#2a9d8f",
16+
name: "secondary"
1817
},
1918
{
20-
color: "hsl(44, 100%, 50%)", // required
21-
name: "tertiary", // required
22-
shade: 600
19+
color: "#e9c46a",
20+
name: "sun"
2321
},
2422
{
25-
color: "#FFBD00", // required
26-
name: "quaternary", // required
27-
shade: 300, // you will set shaders is mandatory
28-
shades: [100, 200, 300, 400, 500]
23+
color: "#f4a261",
24+
name: "lightorange"
25+
},
26+
{
27+
color: "#e76f51",
28+
name: "orange"
2929
}
3030
]);
3131

3232
module.exports = {
3333
content: [
34+
"./app/**/*.{js,ts,jsx,tsx}",
3435
"./pages/**/*.{js,ts,jsx,tsx}",
3536
"./components/**/*.{js,ts,jsx,tsx}"
3637
],
@@ -45,14 +46,17 @@ module.exports = {
4546

4647
## 🎉 Installation
4748

49+
pnpm
50+
51+
> pnpm add -D tailwindcss-palette-generator@latest
52+
4853
yarn
4954

50-
> yarn add tailwindcss-palette-generator
55+
> yarn add --dev tailwindcss-palette-generator@latest
5156
5257
npm
5358

54-
> npm i tailwindcss-palette-generator
55-
59+
> npm i --save-dev tailwindcss-palette-generator@latest
5660
5761
[![npm version](https://badge.fury.io/js/tailwindcss-palette-generator.svg)](https://badge.fury.io/js/tailwindcss-palette-generator)
5862
![NPM](https://img.shields.io/npm/l/tailwindcss-palette-generator)
@@ -67,7 +71,7 @@ npm
6771
### Import
6872

6973
```js
70-
const getPalette = require("tailwindcss-palette-generator");
74+
import getPalette from "tailwindcss-palette-generator";
7175
```
7276

7377
### getPalette()

0 commit comments

Comments
 (0)