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