some docs
This commit is contained in:
@@ -1,19 +1,8 @@
|
||||
export type EmbedOptions = {
|
||||
title?: string
|
||||
description?: string
|
||||
url?: string
|
||||
timestamp?: string
|
||||
color?: number
|
||||
fields?: EmbedFieldOptions[]
|
||||
author?: { name: string; url?: string; icon_url?: string }
|
||||
thumbnail?: { url: string }
|
||||
image?: { url: string }
|
||||
video?: { url: string }
|
||||
footer?: { text: string; icon_url?: string }
|
||||
}
|
||||
import type { Except, SnakeCasedPropertiesDeep } from "type-fest"
|
||||
import type { EmbedProps } from "./embed"
|
||||
|
||||
export type EmbedFieldOptions = {
|
||||
name: string
|
||||
value: string
|
||||
inline?: boolean
|
||||
}
|
||||
export type EmbedOptions = SnakeCasedPropertiesDeep<
|
||||
Except<EmbedProps, "timestamp" | "children"> & {
|
||||
timestamp?: string
|
||||
}
|
||||
>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import React from "react"
|
||||
import type { CamelCasedPropertiesDeep } from "type-fest"
|
||||
import { snakeCaseDeep } from "../../helpers/convert-object-property-case"
|
||||
import { omit } from "../../helpers/omit"
|
||||
import { ReacordElement } from "../element.js"
|
||||
@@ -8,10 +7,17 @@ import { Node } from "../node.js"
|
||||
import { EmbedChildNode } from "./embed-child.js"
|
||||
import type { EmbedOptions } from "./embed-options"
|
||||
|
||||
export type EmbedProps = Omit<
|
||||
CamelCasedPropertiesDeep<EmbedOptions>,
|
||||
"timestamp"
|
||||
> & {
|
||||
export type EmbedProps = {
|
||||
title?: string
|
||||
description?: string
|
||||
url?: string
|
||||
color?: number
|
||||
fields?: Array<{ name: string; value: string; inline?: boolean }>
|
||||
author?: { name: string; url?: string; iconUrl?: string }
|
||||
thumbnail?: { url: string }
|
||||
image?: { url: string }
|
||||
video?: { url: string }
|
||||
footer?: { text: string; iconUrl?: string }
|
||||
timestamp?: string | number | Date
|
||||
children?: React.ReactNode
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user