mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23:29 +01:00
fix(ui): expose options for discord components
This commit is contained in:
@@ -3,6 +3,17 @@ import { DiscordMessageAuthor, type IDiscordMessageAuthor } from './MessageAutho
|
|||||||
import { DiscordMessageInteraction, type IDiscordMessageInteraction } from './MessageInteraction.js';
|
import { DiscordMessageInteraction, type IDiscordMessageInteraction } from './MessageInteraction.js';
|
||||||
import { DiscordMessageReply, type IDiscordMessageReply } from './MessageReply.js';
|
import { DiscordMessageReply, type IDiscordMessageReply } from './MessageReply.js';
|
||||||
|
|
||||||
|
export interface IDiscordMessage {
|
||||||
|
author?: IDiscordMessageAuthor | undefined;
|
||||||
|
authorNode?: ReactNode | undefined;
|
||||||
|
followUp?: boolean;
|
||||||
|
interaction?: IDiscordMessageInteraction | undefined;
|
||||||
|
interactionNode?: ReactNode | undefined;
|
||||||
|
reply?: IDiscordMessageReply | undefined;
|
||||||
|
replyNode?: ReactNode | undefined;
|
||||||
|
time?: string | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
export function DiscordMessage({
|
export function DiscordMessage({
|
||||||
reply,
|
reply,
|
||||||
replyNode,
|
replyNode,
|
||||||
@@ -13,16 +24,7 @@ export function DiscordMessage({
|
|||||||
followUp,
|
followUp,
|
||||||
time,
|
time,
|
||||||
children,
|
children,
|
||||||
}: PropsWithChildren<{
|
}: PropsWithChildren<IDiscordMessage>) {
|
||||||
author?: IDiscordMessageAuthor | undefined;
|
|
||||||
authorNode?: ReactNode | undefined;
|
|
||||||
followUp?: boolean;
|
|
||||||
interaction?: IDiscordMessageInteraction | undefined;
|
|
||||||
interactionNode?: ReactNode | undefined;
|
|
||||||
reply?: IDiscordMessageReply | undefined;
|
|
||||||
replyNode?: ReactNode | undefined;
|
|
||||||
time?: string | undefined;
|
|
||||||
}>) {
|
|
||||||
return (
|
return (
|
||||||
<div className="relative" id="outer-message-wrapper">
|
<div className="relative" id="outer-message-wrapper">
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
import type { PropsWithChildren } from 'react';
|
import type { PropsWithChildren } from 'react';
|
||||||
|
|
||||||
export function DiscordMessages({ rounded, children }: PropsWithChildren<{ rounded?: boolean }>) {
|
export interface IDiscordMessages {
|
||||||
|
rounded?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function DiscordMessages({ rounded, children }: PropsWithChildren<IDiscordMessages>) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`font-source-sans-pro pt-0.1 bg-[rgb(54_57_63)] pb-4 ${rounded ? 'rounded' : ''}`}
|
className={`font-source-sans-pro pt-0.1 bg-[rgb(54_57_63)] pb-4 ${rounded ? 'rounded' : ''}`}
|
||||||
|
|||||||
Reference in New Issue
Block a user