mirror of
https://github.com/strapi/strapi.git
synced 2025-12-25 06:04:29 +00:00
Add test customField
This commit is contained in:
parent
85c1eb1e8e
commit
cdab1407ea
@ -0,0 +1,7 @@
|
||||
import React from 'react';
|
||||
|
||||
const ColorPickerInput = () => {
|
||||
return <div>TODO: Map Input Component</div>;
|
||||
};
|
||||
|
||||
export default ColorPickerInput;
|
||||
@ -4,26 +4,45 @@ import ColorPickerIcon from './components/ColorPicker/ColorPickerIcon';
|
||||
|
||||
export default {
|
||||
register(app) {
|
||||
app.customFields.register({
|
||||
name: 'color',
|
||||
pluginId: 'mycustomfields',
|
||||
type: 'text',
|
||||
icon: ColorPickerIcon,
|
||||
intlLabel: {
|
||||
id: 'mycustomfields.color.label',
|
||||
defaultMessage: 'Color',
|
||||
app.customFields.register([
|
||||
{
|
||||
name: 'map',
|
||||
pluginId: 'mycustomfields',
|
||||
type: 'json',
|
||||
intlLabel: {
|
||||
id: 'mycustomfields.map.label',
|
||||
defaultMessage: 'Map',
|
||||
},
|
||||
intlDescription: {
|
||||
id: 'mycustomfields.map.description',
|
||||
defaultMessage: 'Select any location',
|
||||
},
|
||||
components: {
|
||||
Input: async () =>
|
||||
import(/* webpackChunkName: "input-component" */ './components/Map/MapInput'),
|
||||
},
|
||||
},
|
||||
intlDescription: {
|
||||
id: 'mycustomfields.color.description',
|
||||
defaultMessage: 'Select any color',
|
||||
{
|
||||
name: 'color',
|
||||
pluginId: 'mycustomfields',
|
||||
type: 'text',
|
||||
icon: ColorPickerIcon,
|
||||
intlLabel: {
|
||||
id: 'mycustomfields.color.label',
|
||||
defaultMessage: 'Color',
|
||||
},
|
||||
intlDescription: {
|
||||
id: 'mycustomfields.color.description',
|
||||
defaultMessage: 'Select any color',
|
||||
},
|
||||
components: {
|
||||
Input: async () =>
|
||||
import(
|
||||
/* webpackChunkName: "input-component" */ './components/ColorPicker/ColorPickerInput'
|
||||
),
|
||||
},
|
||||
},
|
||||
components: {
|
||||
Input: async () =>
|
||||
import(
|
||||
/* webpackChunkName: "input-component" */ './components/ColorPicker/ColorPickerInput'
|
||||
),
|
||||
},
|
||||
});
|
||||
]);
|
||||
},
|
||||
bootstrap(app) {},
|
||||
async registerTrads({ locales }) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user