├── .env
├── .gitignore
├── README.md
├── assets
└── img
│ └── Screen_Shot_2022-08-06_at_22.04.09.png
├── package-lock.json
├── package.json
├── postcss.config.js
├── public
├── favicon.ico
├── index.css
├── index.html
├── logo192.png
├── logo512.png
├── manifest.json
└── robots.txt
├── src
├── App.js
├── components
│ ├── Alert.jsx
│ ├── Button.jsx
│ ├── Checkbox.jsx
│ ├── Header.jsx
│ ├── Link.jsx
│ ├── SelectContainer.jsx
│ └── TailwindColors.jsx
├── constants.js
├── index.css
├── index.js
├── reportWebVitals.js
└── setupTests.js
├── tailwind.config.js
└── yarn.lock
/.env:
--------------------------------------------------------------------------------
1 | GENERATE_SOURCEMAP=false
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.idea
6 | /.pnp
7 | .pnp.js
8 |
9 | # testing
10 | /coverage
11 |
12 | # production
13 | /build
14 |
15 | # misc
16 | .DS_Store
17 | .env.local
18 | .env.development.local
19 | .env.test.local
20 | .env.production.local
21 |
22 | npm-debug.log*
23 | yarn-debug.log*
24 | yarn-error.log*
25 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # The demo project of the package [react-tailwindcss-select](https://github.com/onesine/react-tailwindcss-select)
2 |
3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
4 |
5 | #### Preview
6 |
4 |
changeColor("blue")}
6 | className="h-7 px-2 text-xs font-semibold bg-blue-500 rounded-md flex items-center justify-center text-white cursor-pointer">blue
7 |
8 |
changeColor("orange")}
10 | className="h-7 px-2 text-xs font-semibold bg-orange-500 rounded-md flex items-center justify-center text-white cursor-pointer">orange
11 |
12 |
changeColor("yellow")}
14 | className="h-7 px-2 text-xs font-semibold bg-yellow-500 rounded-md flex items-center justify-center text-white cursor-pointer">yellow
15 |
16 |
changeColor("red")}
18 | className="h-7 px-2 text-xs font-semibold bg-red-500 rounded-md flex items-center justify-center text-white cursor-pointer">red
19 |
20 |
changeColor("purple")}
22 | className="h-7 px-2 text-xs font-semibold bg-purple-500 rounded-md flex items-center justify-center text-white cursor-pointer">purple
23 |
24 |
changeColor("amber")}
26 | className="h-7 px-2 text-xs font-semibold bg-amber-500 rounded-md flex items-center justify-center text-white cursor-pointer">amber
27 |
28 |
changeColor("lime")}
30 | className="h-7 px-2 text-xs font-semibold bg-lime-500 rounded-md flex items-center justify-center text-white cursor-pointer">lime
31 |
32 |
changeColor("green")}
34 | className="h-7 px-2 text-xs font-semibold bg-green-500 rounded-md flex items-center justify-center text-white cursor-pointer">green
35 |
36 |
changeColor("emerald")}
38 | className="h-7 px-2 text-xs font-semibold bg-emerald-500 rounded-md flex items-center justify-center text-white cursor-pointer">emerald
39 |
40 |
changeColor("teal")}
42 | className="h-7 px-2 text-xs font-semibold bg-teal-500 rounded-md flex items-center justify-center text-white cursor-pointer">teal
43 |
44 |
changeColor("cyan")}
46 | className="h-7 px-2 text-xs font-semibold bg-cyan-500 rounded-md flex items-center justify-center text-white cursor-pointer">cyan
47 |
48 |
changeColor("sky")}
50 | className="h-7 px-2 text-xs font-semibold bg-sky-500 rounded-md flex items-center justify-center text-white cursor-pointer">sky
51 |
52 |
changeColor("indigo")}
54 | className="h-7 px-2 text-xs font-semibold bg-indigo-500 rounded-md flex items-center justify-center text-white cursor-pointer">indigo
55 |
56 |
changeColor("violet")}
58 | className="h-7 px-2 text-xs font-semibold bg-violet-500 rounded-md flex items-center justify-center text-white cursor-pointer">violet
59 |
60 |
changeColor("purple")}
62 | className="h-7 px-2 text-xs font-semibold bg-purple-500 rounded-md flex items-center justify-center text-white cursor-pointer">purple
63 |
64 |
changeColor("fuchsia")}
66 | className="h-7 px-2 text-xs font-semibold bg-fuchsia-500 rounded-md flex items-center justify-center text-white cursor-pointer">fuchsia
67 |
68 |
changeColor("pink")}
70 | className="h-7 px-2 text-xs font-semibold bg-pink-500 rounded-md flex items-center justify-center text-white cursor-pointer">pink
71 |
72 |
changeColor("rose")}
74 | className="h-7 px-2 text-xs font-semibold bg-rose-500 rounded-md flex items-center justify-center text-white cursor-pointer">rose
75 |
76 |
77 | );
78 | };
79 |
80 | export default TailwindColors;
--------------------------------------------------------------------------------
/src/constants.js:
--------------------------------------------------------------------------------
1 | export const mangas = [
2 | {
3 | label: "SHONEN",
4 | options: [
5 | {value: "One Piece", label: "🤩 One Piece", disabled: false},
6 | {value: "Naruto Shippûden", label: "🤭 Naruto Shippûden", disabled: false},
7 | {value: "Hunter x Hunter", label: "🥰 Hunter x Hunter", disabled: false},
8 | ]
9 | },
10 | {
11 | label: "SHOJO",
12 | options: [
13 | {value: "Orange", label: "🤩 Orange", disabled: false},
14 | {value: "Nana", label: "🤭 Nana", disabled: false},
15 | {value: "Tonari no Kaibutsu-kun", label: "🥰 Tonari no Kaibutsu-kun", disabled: false},
16 | ]
17 | },
18 | {
19 | label: "SEINEN",
20 | options: [
21 | {value: "Death Note", label: "🤩 Death Note", disabled: false},
22 | {value: "Btooom!", label: "🤭 Btooom!", disabled: false},
23 | {value: "Black Lagoon", label: "🥰 Black Lagoon", disabled: false},
24 | ]
25 | },
26 | {
27 | label: "JOSEI",
28 | options: [
29 | {value: "Nodame Cantabile", label: "🤩 Nodame Cantabile", disabled: false},
30 | {value: "Chihayafuru", label: "🤭 Chihayafuru", disabled: false},
31 | {value: "Blue", label: "🥰 Blue", disabled: false},
32 | ]
33 | },
34 | {value: "Naruto Shippûden", label: "🤭 Naruto Shippûden", disabled: false},
35 | {value: "One Piece", label: "🤩 One Piece", disabled: false},
36 | {value: "Bleach", label: "🥹 Bleach", disabled: false},
37 | {value: "Boruto", label: "😡 Boruto", disabled: false},
38 | {value: "Hunter x Hunter", label: "🥰 Hunter x Hunter", disabled: false},
39 | {value: "Dragon Ball Z", label: "🥵 Dragon Ball Z", disabled: false},
40 | {value: "Fullmetal Alchemist", label: "🫡 Fullmetal Alchemist", disabled: false},
41 | {value: "My Hero Academia", label: "🤯 My Hero Academia", disabled: false},
42 | {value: "Black Clover", label: "😍 Black Clover", disabled: false},
43 | ];
44 |
45 | export const selectOptions = [
46 | "isClearable", "isSearchable", "isMultiple", "isDisabled", "loading", "isGroupOption"
47 | ];
48 |
49 | export const printAlertContent = (element, value) => {
50 | const printText = (text, value) => (
51 | value ? (
52 |