chore: format

This commit is contained in:
iCrawl
2023-07-31 21:08:13 +02:00
parent 488aa58b29
commit 447652ec8a
69 changed files with 158 additions and 138 deletions

View File

@@ -4,8 +4,8 @@ import { VscWarning } from '@react-icons/all-files/vsc/VscWarning';
import type { PropsWithChildren } from 'react';
export interface IAlert {
title?: string | undefined;
type: 'danger' | 'info' | 'success' | 'warning';
readonly title?: string | undefined;
readonly type: 'danger' | 'info' | 'success' | 'warning';
}
function resolveType(type: IAlert['type']) {

View File

@@ -5,14 +5,14 @@ import { Disclosure, DisclosureContent, useDisclosureState } from 'ariakit/discl
import type { PropsWithChildren } from 'react';
export interface SectionOptions {
background?: boolean | undefined;
buttonClassName?: string;
className?: string;
defaultClosed?: boolean | undefined;
gutter?: boolean | undefined;
icon?: JSX.Element | undefined;
padded?: boolean | undefined;
title: string;
readonly background?: boolean | undefined;
readonly buttonClassName?: string;
readonly className?: string;
readonly defaultClosed?: boolean | undefined;
readonly gutter?: boolean | undefined;
readonly icon?: JSX.Element | undefined;
readonly padded?: boolean | undefined;
readonly title: string;
}
export function Section({

View File

@@ -4,14 +4,14 @@ import { DiscordMessageInteraction, type IDiscordMessageInteraction } from './Me
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;
readonly author?: IDiscordMessageAuthor | undefined;
readonly authorNode?: ReactNode | undefined;
readonly followUp?: boolean;
readonly interaction?: IDiscordMessageInteraction | undefined;
readonly interactionNode?: ReactNode | undefined;
readonly reply?: IDiscordMessageReply | undefined;
readonly replyNode?: ReactNode | undefined;
readonly time?: string | undefined;
}
export function DiscordMessage({

View File

@@ -1,12 +1,12 @@
import { FiCheck } from '@react-icons/all-files/fi/FiCheck';
export interface IDiscordMessageAuthor {
avatar: string;
bot?: boolean;
color?: string;
time: string;
username: string;
verified?: boolean;
readonly avatar: string;
readonly bot?: boolean;
readonly color?: string;
readonly time: string;
readonly username: string;
readonly verified?: boolean;
}
export function DiscordMessageAuthor({ avatar, bot, verified, color, time, username }: IDiscordMessageAuthor) {

View File

@@ -1,11 +1,11 @@
import { FiCheck } from '@react-icons/all-files/fi/FiCheck';
export interface IDiscordMessageAuthorReply {
avatar: string;
bot?: boolean;
color?: string;
username: string;
verified?: boolean;
readonly avatar: string;
readonly bot?: boolean;
readonly color?: string;
readonly username: string;
readonly verified?: boolean;
}
export function DiscordMessageAuthorReply({ avatar, bot, verified, color, username }: IDiscordMessageAuthorReply) {

View File

@@ -5,7 +5,10 @@ export function DiscordMessageBaseReply({
author,
authorNode,
children,
}: PropsWithChildren<{ author?: IDiscordMessageAuthorReply | undefined; authorNode?: ReactNode | undefined }>) {
}: PropsWithChildren<{
readonly author?: IDiscordMessageAuthorReply | undefined;
readonly authorNode?: ReactNode | undefined;
}>) {
return (
<div
className="relative mb-1 flex place-items-center before:absolute before:bottom-0 before:left-[-36px] before:right-full before:top-[50%] before:mr-1 before:block before:border-l-2 before:border-t-2 before:border-[rgb(79_84_92)] before:rounded-tl-1.5 before:content-none"

View File

@@ -8,15 +8,15 @@ import { DiscordMessageEmbedThumbnail, type IDiscordMessageEmbedThumbnail } from
import { DiscordMessageEmbedTitle, type IDiscordMessageEmbedTitle } from './MessageEmbedTitle.js';
export interface IDiscordMessageEmbed {
author?: IDiscordMessageEmbedAuthor | undefined;
authorNode?: ReactNode | undefined;
fields?: IDiscordMessageEmbedField[];
footer?: IDiscordMessageEmbedFooter | undefined;
footerNode?: ReactNode | undefined;
image?: IDiscordMessageEmbedImage;
thumbnail?: IDiscordMessageEmbedThumbnail;
title?: IDiscordMessageEmbedTitle | undefined;
titleNode?: ReactNode | undefined;
readonly author?: IDiscordMessageEmbedAuthor | undefined;
readonly authorNode?: ReactNode | undefined;
readonly fields?: IDiscordMessageEmbedField[];
readonly footer?: IDiscordMessageEmbedFooter | undefined;
readonly footerNode?: ReactNode | undefined;
readonly image?: IDiscordMessageEmbedImage;
readonly thumbnail?: IDiscordMessageEmbedThumbnail;
readonly title?: IDiscordMessageEmbedTitle | undefined;
readonly titleNode?: ReactNode | undefined;
}
export function DiscordMessageEmbed({

View File

@@ -1,7 +1,7 @@
export interface IDiscordMessageEmbedAuthor {
avatar: string;
url?: string;
username: string;
readonly avatar: string;
readonly url?: string;
readonly username: string;
}
export function DiscordMessageEmbedAuthor({ avatar, url, username }: IDiscordMessageEmbedAuthor) {

View File

@@ -1,7 +1,7 @@
export interface IDiscordMessageEmbedField {
inline?: boolean;
name: string;
value: string;
readonly inline?: boolean;
readonly name: string;
readonly value: string;
}
export function DiscordMessageEmbedField({ name, value, inline }: IDiscordMessageEmbedField) {

View File

@@ -1,7 +1,7 @@
import { DiscordMessageEmbedField, type IDiscordMessageEmbedField } from './MessageEmbedField.js';
export interface IDiscordMessageEmbedFields {
fields: IDiscordMessageEmbedField[];
readonly fields: IDiscordMessageEmbedField[];
}
export function DiscordMessageEmbedFields({ fields }: IDiscordMessageEmbedFields) {

View File

@@ -1,7 +1,7 @@
export interface IDiscordMessageEmbedFooter {
content?: string;
icon?: string;
timestamp?: string;
readonly content?: string;
readonly icon?: string;
readonly timestamp?: string;
}
export function DiscordMessageEmbedFooter({ content, icon, timestamp }: IDiscordMessageEmbedFooter) {

View File

@@ -1,8 +1,8 @@
export interface IDiscordMessageEmbedImage {
alt: string;
height: number;
url: string;
width: number;
readonly alt: string;
readonly height: number;
readonly url: string;
readonly width: number;
}
export function DiscordMessageEmbedImage({ alt, height, url, width }: IDiscordMessageEmbedImage) {

View File

@@ -1,6 +1,6 @@
export interface IDiscordMessageEmbedThumbnail {
alt: string;
image: string;
readonly alt: string;
readonly image: string;
}
export function DiscordMessageEmbedThumbnail({ alt, image }: IDiscordMessageEmbedThumbnail) {

View File

@@ -1,6 +1,6 @@
export interface IDiscordMessageEmbedTitle {
title: string;
url?: string;
readonly title: string;
readonly url?: string;
}
export function DiscordMessageEmbedTitle({ title, url }: IDiscordMessageEmbedTitle) {

View File

@@ -3,9 +3,9 @@ import type { IDiscordMessageAuthorReply } from './MessageAuthorReply.js';
import { DiscordMessageBaseReply } from './MessageBaseReply.js';
export interface IDiscordMessageInteraction {
author?: IDiscordMessageAuthorReply | undefined;
authorNode?: ReactNode | undefined;
command?: string;
readonly author?: IDiscordMessageAuthorReply | undefined;
readonly authorNode?: ReactNode | undefined;
readonly command?: string;
}
export function DiscordMessageInteraction({ author, authorNode, command }: IDiscordMessageInteraction) {

View File

@@ -3,9 +3,9 @@ import type { IDiscordMessageAuthorReply } from './MessageAuthorReply.js';
import { DiscordMessageBaseReply } from './MessageBaseReply.js';
export interface IDiscordMessageReply {
author?: IDiscordMessageAuthorReply | undefined;
authorNode?: ReactNode | undefined;
content: string;
readonly author?: IDiscordMessageAuthorReply | undefined;
readonly authorNode?: ReactNode | undefined;
readonly content: string;
}
export function DiscordMessageReply({ author, authorNode, content }: IDiscordMessageReply) {

View File

@@ -1,7 +1,7 @@
import type { PropsWithChildren } from 'react';
export interface IDiscordMessages {
rounded?: boolean;
readonly rounded?: boolean;
}
export function DiscordMessages({ rounded, children }: PropsWithChildren<IDiscordMessages>) {