Skip to content

Commit 38ac483

Browse files
authored
Feat: make compatible with latest version (#5)
1 parent 80a5717 commit 38ac483

9 files changed

Lines changed: 1707 additions & 1479 deletions

File tree

README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1+
<p align="center"><a href="https://canopas.com/contact"><img src="./assets/banner.png"></a></p>
2+
13
<h1><strong>Tagsinput plugin for strapi</strong></h1>
24

35
This plugin is used to add tagsinput in your strapi admin panel.
46
Read more about it at [tagsinput guidence](https://blog.canopas.com/the-simple-guidance-how-to-add-tagsinput-customfield-plugin-in-strapi-b5d2b5af7c3b).
57

8+
<img src="./assets/demo.png">
9+
610
## How to Install
711

812
Using npm,
13+
914
```
1015
npm i strapi-plugin-tagsinput
1116
```
@@ -16,10 +21,30 @@ Using yarn,
1621
yarn add strapi-plugin-tagsinput
1722
```
1823

19-
## Demo
24+
## Showcase
25+
2026
How to use tagsinput?
2127

22-
![Tagsinput](https://github.com/canopas/strapi-plugin-tagsinput/assets/69897605/bb6f78f3-39de-4d29-bb1f-c60e019c79ae)
28+
<img src="./assets/showcase.gif">
29+
30+
## Issues
31+
32+
If you face any issues, feel free to submit them with detailed information.
33+
34+
## Contributing
35+
36+
Feel free to fork and make a Pull Request to this plugin project. All the inputs are warmly welcome!
37+
38+
## Show your support ⭐️
39+
40+
Add a star if this project helped you.
41+
42+
## Credits
43+
44+
This repository is owned and maintained by the [Canopas team](https://canopas.com/). If you are interested in building web apps, plugins or designing products, please let us know. We'd love to hear from you!
45+
46+
<a href="https://canopas.com/contact"><img src="./assets/cta.png" width=300></a>
2347

2448
## Licence
49+
2550
This repository licenced under [MIT](https://github.com/canopas/strapi-plugin-tagsinput/blob/main/LICENSE).

admin/src/components/Input/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import TagsInput from "react-tagsinput";
2-
import "react-tagsinput/react-tagsinput.css";
32
import React, { useState } from "react";
43
import PropTypes from "prop-types";
4+
import "../styles/global.css";
55

66
import {
77
Flex,
@@ -51,8 +51,7 @@ const Tags = ({
5151
// GenericInput calls formatMessage and returns a string for the error
5252
error={error}
5353
hint={description && formatMessage(description)}
54-
required={required}
55-
>
54+
required={required}>
5655
<Flex direction="column" alignItems="stretch" gap={1}>
5756
<FieldLabel action={labelAction}>{formatMessage(intlLabel)}</FieldLabel>
5857
<Flex>
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
:root {
2+
--primary: rgb(151, 54, 232);
3+
--secondary: rgb(255, 255, 255);
4+
}
5+
6+
.react-tagsinput {
7+
width: 100%;
8+
background-color: var(--secondary);
9+
border: 1px solid #ccc;
10+
border-radius: 4px;
11+
overflow: hidden;
12+
padding-left: 5px;
13+
padding-top: 5px;
14+
}
15+
16+
.react-tagsinput--focused {
17+
outline: 3px solid var(--primary);
18+
}
19+
20+
.react-tagsinput-tag {
21+
background-color: var(--primary);
22+
border-radius: 2px;
23+
border: 1px solid var(--primary);
24+
color: var(--secondary);
25+
display: inline-block;
26+
font-family: sans-serif;
27+
font-size: 13px;
28+
font-weight: 400;
29+
margin-bottom: 5px;
30+
margin-right: 5px;
31+
padding: 5px;
32+
}
33+
34+
.react-tagsinput-remove {
35+
cursor: pointer;
36+
font-weight: bold;
37+
}
38+
39+
.react-tagsinput-tag a::before {
40+
content: " ×";
41+
}
42+
43+
.react-tagsinput-input {
44+
background: transparent;
45+
border: 0;
46+
color: #777;
47+
font-family: sans-serif;
48+
font-size: 13px;
49+
font-weight: 400;
50+
margin-bottom: 6px;
51+
margin-top: 1px;
52+
outline: none;
53+
padding: 5px;
54+
width: 80px;
55+
}

assets/banner.png

44.3 KB
Loading

assets/cta.png

68.8 KB
Loading

assets/demo.png

6.29 KB
Loading

assets/showcase.gif

2.6 MB
Loading

package.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "strapi-plugin-tagsinput",
3-
"version": "1.0.1",
4-
"description": "Add tagsinput in your strapi project",
3+
"version": "1.0.3",
4+
"description": "Tagsinput plugin for your strapi project",
55
"strapi": {
66
"name": "tagsinput",
7-
"description": "Add tagsinput in your strapi project",
7+
"description": "Tagsinput plugin for your strapi project",
88
"kind": "plugin",
99
"displayName": "Tagsinput"
1010
},
@@ -13,35 +13,35 @@
1313
"url": "git+https://github.com/canopas/strapi-plugin-tagsinput.git"
1414
},
1515
"dependencies": {
16-
"@babel/preset-react": "^7.18.6",
17-
"@strapi/design-system": "^1.6.3",
18-
"@strapi/helper-plugin": "^4.6.0",
19-
"@strapi/icons": "^1.6.3",
20-
"prop-types": "^15.7.2",
21-
"react-tagsinput": "^3.20.1"
16+
"@babel/preset-react": "^7.23.3",
17+
"@strapi/design-system": "^1.14.1",
18+
"@strapi/helper-plugin": "^4.20.2",
19+
"@strapi/icons": "^1.14.1",
20+
"prop-types": "^15.8.1",
21+
"react-tagsinput": "^3.20.3"
2222
},
2323
"devDependencies": {
24-
"@babel/cli": "^7.21.5",
25-
"@babel/core": "^7.21.8",
26-
"@babel/preset-env": "^7.21.5",
27-
"react": "^17.0.2",
28-
"react-dom": "^17.0.2",
24+
"@babel/cli": "^7.23.9",
25+
"@babel/core": "^7.23.9",
26+
"@babel/preset-env": "^7.23.9",
27+
"react": "^18.2.0",
28+
"react-dom": "^18.2.0",
2929
"react-router-dom": "^5.3.4",
30-
"styled-components": "^5.3.6"
30+
"styled-components": "^5.3.11"
3131
},
3232
"peerDependencies": {
33-
"@strapi/strapi": "^4.0.0",
34-
"react": "^17.0.2",
35-
"react-dom": "^17.0.2",
33+
"@strapi/strapi": "^4.20.2",
34+
"react": "^18.2.0",
35+
"react-dom": "^18.2.0",
3636
"react-router-dom": "^5.3.4",
37-
"styled-components": "^5.3.6"
37+
"styled-components": "^5.3.11"
3838
},
3939
"author": "Canopas",
4040
"maintainers": [
4141
"Canopas"
4242
],
4343
"engines": {
44-
"node": ">=14.19.1 <=18.x.x",
44+
"node": ">=14.19.1 <=20.x.x",
4545
"npm": ">=6.0.0"
4646
},
4747
"license": "MIT",

0 commit comments

Comments
 (0)