mirror of
https://github.com/strapi/strapi.git
synced 2025-12-26 22:54:31 +00:00
Upcase custom field test types
This commit is contained in:
parent
e3e72a1b8a
commit
a0fa85166f
@ -47,17 +47,18 @@ export default {
|
||||
];
|
||||
|
||||
allTypes.forEach((type) => {
|
||||
const upcasedType = type.charAt(0).toUpperCase() + type.slice(1);
|
||||
const customField = {
|
||||
type,
|
||||
pluginId: 'myplugin',
|
||||
name: `custom${type}`,
|
||||
name: `custom${upcasedType}`,
|
||||
intlLabel: {
|
||||
id: 'customfieldtest',
|
||||
defaultMessage: `custom${type}`,
|
||||
defaultMessage: `custom${upcasedType}`,
|
||||
},
|
||||
intlDescription: {
|
||||
id: 'customfieldtest',
|
||||
defaultMessage: `custom${type}`,
|
||||
defaultMessage: `custom${upcasedType}`,
|
||||
},
|
||||
components: {
|
||||
Input: async () =>
|
||||
|
||||
@ -21,9 +21,10 @@ module.exports = ({ strapi }) => {
|
||||
];
|
||||
|
||||
allTypes.forEach((type) => {
|
||||
const upcasedType = type.charAt(0).toUpperCase() + type.slice(1);
|
||||
strapi.customFields.register({
|
||||
type,
|
||||
name: `custom${type}`,
|
||||
name: `custom${upcasedType}`,
|
||||
plugin: 'myplugin',
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user