File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
packages/react/src/components Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ export type DiscordInteractionProps = {
1515 ephemeral ?: boolean
1616 highlight ?: boolean
1717 profile ?: string
18- roleColor ?: string
18+ roleColor ?: string ,
19+ contextMenu ?: boolean ,
1920} & PropsWithSlot
2021
2122export default function DiscordInteraction ( {
@@ -28,6 +29,7 @@ export default function DiscordInteraction({
2829 highlight,
2930 profile : profileKey ,
3031 roleColor,
32+ contextMenu,
3133} : DiscordInteractionProps ) : ReactElement {
3234 const options : DiscordMessageOptions = useContext ( DiscordOptionsContext ) ?? DiscordDefaultOptions
3335
@@ -48,11 +50,13 @@ export default function DiscordInteraction({
4850 bot = { user . bot }
4951 roleColor = { user . roleColor }
5052 />
51- { command
52- ? < span className = "discord-interaction-command" >
53+ { command || contextMenu
54+ ? < span className = { `discord-interaction-command${ contextMenu
55+ ? ' discord-interaction-context-menu'
56+ : '' } `} >
5357 used{ ' ' }
5458 < span className = "discord-interaction-command-name" >
55- / { children }
59+ { contextMenu ? '' : '/' } { children }
5660 </ span >
5761 </ span >
5862 : < span className = "discord-interaction-reply" >
You can’t perform that action at this time.
0 commit comments