fix: use "other" component type in decide Card header background (#1359)
if no other background color is found
This commit is contained in:
@@ -67,4 +67,5 @@ export const COMPONENT_TYPE_STYLE_COLOR_MAP = {
|
||||
sequential: 'component-style-default',
|
||||
chapter: 'component-style-default',
|
||||
collection: 'component-style-collection',
|
||||
other: 'component-style-other',
|
||||
};
|
||||
|
||||
@@ -11,5 +11,5 @@ export function getItemIcon(blockType: string): React.ComponentType {
|
||||
}
|
||||
|
||||
export function getComponentStyleColor(blockType: string): string {
|
||||
return COMPONENT_TYPE_STYLE_COLOR_MAP[blockType] ?? 'bg-component';
|
||||
return COMPONENT_TYPE_STYLE_COLOR_MAP[blockType] ?? COMPONENT_TYPE_STYLE_COLOR_MAP.other;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user