Merge pull request #18682 from ivangonzalezacuna/feat/homepage-allow-hide-card-title
(feat): Allow hiding card title in custom homepage cards
This commit is contained in:
@@ -176,6 +176,8 @@ properties. The `settings.schema` object should follow
|
||||
must be `object`. As well, the `uiSchema` can be defined if a certain UI style needs to be applied fo any of the defined
|
||||
properties. More documentation [here](https://rjsf-team.github.io/react-jsonschema-form/docs/api-reference/uiSchema).
|
||||
|
||||
If you want to hide the card title, you can do it by setting a `name` and leaving the `title` empty.
|
||||
|
||||
```tsx
|
||||
import { createCardExtension } from '@backstage/plugin-home-react';
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ export type ClockConfig = {
|
||||
|
||||
// @public (undocumented)
|
||||
export const ComponentAccordion: (props: {
|
||||
title: string;
|
||||
title?: string | undefined;
|
||||
expanded?: boolean | undefined;
|
||||
Content: () => JSX.Element;
|
||||
Actions?: (() => JSX.Element) | undefined;
|
||||
@@ -156,7 +156,7 @@ export type RendererProps = RendererProps_2;
|
||||
export const SettingsModal: (props: {
|
||||
open: boolean;
|
||||
close: Function;
|
||||
componentName: string;
|
||||
componentName?: string | undefined;
|
||||
children: JSX.Element;
|
||||
}) => JSX.Element;
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ const useStyles = makeStyles((theme: Theme) => ({
|
||||
}));
|
||||
|
||||
export const ComponentAccordion = (props: {
|
||||
title: string;
|
||||
title?: string;
|
||||
expanded?: boolean;
|
||||
Content: () => JSX.Element;
|
||||
Actions?: () => JSX.Element;
|
||||
|
||||
@@ -29,7 +29,7 @@ interface AddWidgetDialogProps {
|
||||
}
|
||||
|
||||
const getTitle = (widget: Widget) => {
|
||||
return widget.title ?? widget.name;
|
||||
return widget.title || widget.name;
|
||||
};
|
||||
|
||||
export const AddWidgetDialog = (props: AddWidgetDialogProps) => {
|
||||
|
||||
Reference in New Issue
Block a user