Change infobox to be its own type

main v0.1.0
trivernis 2 months ago
parent c61a85e0cd
commit 43be59a361
Signed by: Trivernis
GPG Key ID: 7E6D18B61C8D2F4B

@ -40,7 +40,8 @@
"components": [
"content.gallery",
"content.image",
"content.text-markdown"
"content.text-markdown",
"content.infobox"
],
"pluginOptions": {
"i18n": {

@ -0,0 +1,15 @@
{
"collectionName": "components_content_infoboxes",
"info": {
"displayName": "Infobox"
},
"options": {},
"attributes": {
"title": {
"type": "string"
},
"value": {
"type": "richtext"
}
}
}

@ -1,22 +1,13 @@
{
"collectionName": "components_content_text_markdowns",
"info": {
"displayName": "Text - Markdown",
"displayName": "Paragraph",
"description": ""
},
"options": {},
"attributes": {
"value": {
"type": "richtext"
},
"type": {
"type": "enumeration",
"enum": [
"paragraph",
"infobox"
],
"default": "paragraph",
"required": true
}
}
}

@ -20,17 +20,25 @@ export interface ContentImage extends Schema.Component {
};
}
export interface ContentInfobox extends Schema.Component {
collectionName: 'components_content_infoboxes';
info: {
displayName: 'Infobox';
};
attributes: {
title: Attribute.String;
value: Attribute.RichText;
};
}
export interface ContentTextMarkdown extends Schema.Component {
collectionName: 'components_content_text_markdowns';
info: {
displayName: 'Text - Markdown';
displayName: 'Paragraph';
description: '';
};
attributes: {
value: Attribute.RichText;
type: Attribute.Enumeration<['paragraph', 'infobox']> &
Attribute.Required &
Attribute.DefaultTo<'paragraph'>;
};
}
@ -39,6 +47,7 @@ declare module '@strapi/types' {
export interface Components {
'content.gallery': ContentGallery;
'content.image': ContentImage;
'content.infobox': ContentInfobox;
'content.text-markdown': ContentTextMarkdown;
}
}

@ -961,7 +961,12 @@ export interface ApiBlogPostBlogPost extends Schema.CollectionType {
'api::author.author'
>;
content: Attribute.DynamicZone<
['content.gallery', 'content.image', 'content.text-markdown']
[
'content.gallery',
'content.image',
'content.text-markdown',
'content.infobox'
]
> &
Attribute.SetPluginOptions<{
i18n: {

Loading…
Cancel
Save