mirror of
https://github.com/discordjs/discord.js.git
synced 2024-08-21 22:24:45 +12:00
fix(ui): expose options for discord components
This commit is contained in:
parent
7c8849fae5
commit
13073acefc
2 changed files with 17 additions and 11 deletions
|
@ -3,6 +3,17 @@ import { DiscordMessageAuthor, type IDiscordMessageAuthor } from './MessageAutho
|
|||
import { DiscordMessageInteraction, type IDiscordMessageInteraction } from './MessageInteraction.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({
|
||||
reply,
|
||||
replyNode,
|
||||
|
@ -13,16 +24,7 @@ export function DiscordMessage({
|
|||
followUp,
|
||||
time,
|
||||
children,
|
||||
}: PropsWithChildren<{
|
||||
author?: IDiscordMessageAuthor | undefined;
|
||||
authorNode?: ReactNode | undefined;
|
||||
followUp?: boolean;
|
||||
interaction?: IDiscordMessageInteraction | undefined;
|
||||
interactionNode?: ReactNode | undefined;
|
||||
reply?: IDiscordMessageReply | undefined;
|
||||
replyNode?: ReactNode | undefined;
|
||||
time?: string | undefined;
|
||||
}>) {
|
||||
}: PropsWithChildren<IDiscordMessage>) {
|
||||
return (
|
||||
<div className="relative" id="outer-message-wrapper">
|
||||
<div
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
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 (
|
||||
<div
|
||||
className={`font-source-sans-pro pt-0.1 bg-[rgb(54_57_63)] pb-4 ${rounded ? 'rounded' : ''}`}
|
||||
|
|
Loading…
Reference in a new issue