mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-19 07:56:02 +01:00
@@ -105,25 +105,27 @@ const ContextButton: React.FC<{
|
|||||||
>
|
>
|
||||||
<Group position="apart" w="100%" noWrap>
|
<Group position="apart" w="100%" noWrap>
|
||||||
<Stack className={classes.buttonStack}>
|
<Stack className={classes.buttonStack}>
|
||||||
<Group className={classes.buttonGroup}>
|
{(button.title || Number.isNaN(+buttonKey)) && (
|
||||||
{button?.icon && (
|
<Group className={classes.buttonGroup}>
|
||||||
<Stack className={classes.buttonIconContainer}>
|
{button?.icon && (
|
||||||
{typeof button.icon === 'string' && isIconUrl(button.icon) ? (
|
<Stack className={classes.buttonIconContainer}>
|
||||||
<img src={button.icon} className={classes.iconImage} alt="Missing img" />
|
{typeof button.icon === 'string' && isIconUrl(button.icon) ? (
|
||||||
) : (
|
<img src={button.icon} className={classes.iconImage} alt="Missing img" />
|
||||||
<FontAwesomeIcon
|
) : (
|
||||||
icon={button.icon as IconProp}
|
<FontAwesomeIcon
|
||||||
fixedWidth
|
icon={button.icon as IconProp}
|
||||||
size="lg"
|
fixedWidth
|
||||||
style={{ color: button.iconColor }}
|
size="lg"
|
||||||
/>
|
style={{ color: button.iconColor }}
|
||||||
)}
|
/>
|
||||||
</Stack>
|
)}
|
||||||
)}
|
</Stack>
|
||||||
<Text className={classes.buttonTitleText}>
|
)}
|
||||||
<ReactMarkdown components={MarkdownComponents}>{button.title || buttonKey}</ReactMarkdown>
|
<Text className={classes.buttonTitleText}>
|
||||||
</Text>
|
<ReactMarkdown components={MarkdownComponents}>{button.title || buttonKey}</ReactMarkdown>
|
||||||
</Group>
|
</Text>
|
||||||
|
</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>
|
||||||
|
|||||||
Reference in New Issue
Block a user