Don't render header divider on homepage cards if no title was specified.
Some homepage cards would like to define their own header for example, so that a title can be set dynamically. Removing the divider with the divider prop provides a way to put everything in the content area without an extraneous divider above. The divider is usually not easily visible using the default theme, however customized themes that may use a larger border-radius this divider becomes visible and distracting. Signed-off-by: Adam Kunicki <kunickiaj@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-home-react': patch
|
||||
---
|
||||
|
||||
Don't render header divider on homepage cards if no title was specified.
|
||||
@@ -47,7 +47,9 @@ export type RendererProps = { title?: string } & ComponentParts;
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export type CardExtensionProps<T> = ComponentRenderer & { title?: string } & T;
|
||||
export type CardExtensionProps<T> = ComponentRenderer & {
|
||||
title?: string;
|
||||
} & T;
|
||||
|
||||
/**
|
||||
* @public
|
||||
@@ -150,7 +152,7 @@ function CardExtension<T>(props: CardExtensionComponentProps<T>) {
|
||||
}
|
||||
|
||||
const cardProps = {
|
||||
...(title && { title }),
|
||||
...(title && { title, divider: !!title }),
|
||||
...(Settings && !isCustomizable
|
||||
? {
|
||||
action: (
|
||||
|
||||
Reference in New Issue
Block a user