-
Couldn't load subscription status.
- Fork 1
Open
Description
If you have a component defined like:
export const FAQContentType = contentType({
key: 'FAQ',
baseType: '_page',
displayName: 'FAQ',
mayContainTypes: [ArticleContentType],
properties: {
heading: {
type: 'string',
},
body: {
type: 'richText',
},
},
});
With his own display settings:
export const FAQDisplayTemplate = displayTemplate({
key: "FAQDisplayTemplate",
isDefault: true,
displayName: "FAQ Styles",
contentType: "FAQ",
settings: {
switchOrder: {
editor: "checkbox",
displayName: "Switch order",
sortOrder: 0,
choices: {
true: {
displayName: "Inversed direction",
sortOrder: 1,
},
false: {
displayName: "Normal direction",
sortOrder: 2,
},
},
},
},
});
Problem
How would you retrieve the displaySettings?
I thought this would work:
type Props = {
opti: Infer<typeof FAQContentType>;
displaySettings?: Record<string, string>;
};
Metadata
Metadata
Assignees
Labels
No labels