feat(web/context): optional context menu title property

Closes #428
This commit is contained in:
Luke
2023-10-28 18:51:09 +02:00
parent 1c5f4d6ac8
commit 4d14bb0124

View File

@@ -105,6 +105,7 @@ const ContextButton: React.FC<{
> >
<Group position="apart" w="100%" noWrap> <Group position="apart" w="100%" noWrap>
<Stack className={classes.buttonStack}> <Stack className={classes.buttonStack}>
{(button.title || Number.isNaN(+buttonKey)) && (
<Group className={classes.buttonGroup}> <Group className={classes.buttonGroup}>
{button?.icon && ( {button?.icon && (
<Stack className={classes.buttonIconContainer}> <Stack className={classes.buttonIconContainer}>
@@ -124,6 +125,7 @@ const ContextButton: React.FC<{
<ReactMarkdown components={MarkdownComponents}>{button.title || buttonKey}</ReactMarkdown> <ReactMarkdown components={MarkdownComponents}>{button.title || buttonKey}</ReactMarkdown>
</Text> </Text>
</Group> </Group>
)}
{button.description && ( {button.description && (
<Text className={classes.description}> <Text className={classes.description}>
<ReactMarkdown components={MarkdownComponents}>{button.description}</ReactMarkdown> <ReactMarkdown components={MarkdownComponents}>{button.description}</ReactMarkdown>