mirror of
https://github.com/strapi/strapi.git
synced 2025-10-16 10:33:34 +00:00
WIP remove mycustomfields plugin
This commit is contained in:
parent
acd1d0640f
commit
b381606c1a
@ -1,10 +1,6 @@
|
||||
# Strapi plugin Custom Fields
|
||||
# Strapi plugin Color Picker
|
||||
|
||||
A custom field plugin to house Strapi maintained custom fields
|
||||
|
||||
## Custom Fields
|
||||
|
||||
- [Color Picker](#color-picker)
|
||||
A Strapi-maintainted color picker custom field
|
||||
|
||||
## Installation
|
||||
|
||||
@ -12,10 +8,10 @@ To install this plugin, you need to add an NPM dependency to your Strapi applica
|
||||
|
||||
```sh
|
||||
# Using Yarn
|
||||
yarn add @strapi/custom-fields
|
||||
yarn add @strapi/plugin-color-picker
|
||||
|
||||
# Or using NPM
|
||||
npm install @strapi/custom-fields
|
||||
npm install @strapi/plugin-color-picker
|
||||
```
|
||||
|
||||
Then, you'll need to build your admin panel:
|
||||
@ -28,7 +24,7 @@ yarn build
|
||||
npm run build
|
||||
```
|
||||
|
||||
## Color Picker
|
||||
## Usage
|
||||
|
||||
Use saturation and hue sliders to select a color and save the value as a HEX string
|
||||
|
@ -5,7 +5,7 @@ import { IntlProvider } from 'react-intl';
|
||||
import ColorPickerInput from '../ColorPicker/ColorPickerInput';
|
||||
|
||||
const mockAttribute = {
|
||||
customField: 'plugin::custom-fields.color-picker',
|
||||
customField: 'plugin::color-picker.color',
|
||||
pluginOptions: { i18n: { localized: true } },
|
||||
type: 'string',
|
||||
};
|
@ -6,13 +6,13 @@ import getTrad from './utils/getTrad';
|
||||
export default {
|
||||
register(app) {
|
||||
app.customFields.register({
|
||||
name: 'color-picker',
|
||||
pluginId: 'custom-fields',
|
||||
name: 'color',
|
||||
pluginId: 'color-picker',
|
||||
type: 'string',
|
||||
icon: ColorPickerIcon,
|
||||
intlLabel: {
|
||||
id: getTrad('color-picker.label'),
|
||||
defaultMessage: 'Color Picker',
|
||||
defaultMessage: 'Color',
|
||||
},
|
||||
intlDescription: {
|
||||
id: getTrad('color-picker.description'),
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"color-picker.label": "Color Picker",
|
||||
"color-picker.label": "Color",
|
||||
"color-picker.description": "Select any color",
|
||||
"color-picker.settings": "Settings",
|
||||
"color-picket.input.format": "HEX",
|
||||
@ -9,4 +9,4 @@
|
||||
"color-picker.options.advanced.requiredField.description": "You won't be able to create an entry if this field is empty",
|
||||
"color-picker.toggle.aria-label": "Color picker toggle",
|
||||
"color-picker.input.aria-label": "Color picker input"
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
import pluginId from '../pluginId';
|
||||
|
||||
const getTrad = id => `${pluginId}.${id}`;
|
||||
const getTrad = (id) => `${pluginId}.${id}`;
|
||||
|
||||
export default getTrad;
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@strapi/custom-fields",
|
||||
"name": "@strapi/plugin-color-picker",
|
||||
"version": "4.3.4",
|
||||
"description": "Strapi maintained Custom Fields",
|
||||
"description": "Color picker custom field",
|
||||
"strapi": {
|
||||
"name": "custom-fields",
|
||||
"description": "Strapi maintained Custom Fields",
|
||||
"name": "color-picker",
|
||||
"description": "Color picker custom field",
|
||||
"kind": "plugin",
|
||||
"displayName": "Custom Fields"
|
||||
"displayName": "Color Picker"
|
||||
},
|
||||
"dependencies": {},
|
||||
"peerDependencies": {
|
||||
@ -15,7 +15,7 @@
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/strapi/strapi.git",
|
||||
"directory": "packages/plugins/custom-fields"
|
||||
"directory": "packages/plugins/color-picker"
|
||||
},
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"author": {
|
@ -2,8 +2,8 @@
|
||||
|
||||
module.exports = ({ strapi }) => {
|
||||
strapi.customFields.register({
|
||||
name: 'color-picker',
|
||||
plugin: 'custom-fields',
|
||||
name: 'color',
|
||||
plugin: 'color-picker',
|
||||
type: 'string',
|
||||
});
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user