mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
refactor(website): dark mode
This commit is contained in:
@@ -6,6 +6,7 @@ import type { PropsWithChildren } from 'react';
|
||||
|
||||
export interface SectionOptions {
|
||||
background?: boolean | undefined;
|
||||
buttonClassName?: string;
|
||||
className?: string;
|
||||
defaultClosed?: boolean | undefined;
|
||||
dense?: boolean | undefined;
|
||||
@@ -25,13 +26,18 @@ export function Section({
|
||||
gutter = false,
|
||||
children,
|
||||
className = '',
|
||||
buttonClassName = '',
|
||||
}: PropsWithChildren<SectionOptions>) {
|
||||
const disclosure = useDisclosureState({ defaultOpen: !defaultClosed });
|
||||
|
||||
return (
|
||||
<div className={`flex flex-col ${className}`}>
|
||||
<Disclosure
|
||||
className="hover:bg-light-800 active:bg-light-800 dark:bg-dark-600 dark:hover:bg-dark-500 dark:active:bg-dark-400 focus:ring-width-2 focus:ring-blurple rounded bg-white p-3 outline-0 focus:ring"
|
||||
className={
|
||||
buttonClassName
|
||||
? buttonClassName
|
||||
: 'hover:bg-light-800 active:bg-light-900 dark:bg-dark-400 dark:hover:bg-dark-300 dark:active:bg-dark-200 focus:ring-width-2 focus:ring-blurple rounded bg-white p-3 outline-0 focus:ring'
|
||||
}
|
||||
state={disclosure}
|
||||
>
|
||||
<div className="flex flex-row place-content-between place-items-center">
|
||||
|
||||
Reference in New Issue
Block a user