mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 01:53:30 +01:00
chore: bump dependencies (#11133)
* chore: bump dependencies * chore: another bump
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { Disclosure, DisclosureContent, useDisclosureStore } from '@ariakit/react/disclosure';
|
||||
import { VscChevronDown } from '@react-icons/all-files/vsc/VscChevronDown';
|
||||
import { Disclosure, DisclosureContent, useDisclosureState } from 'ariakit/disclosure';
|
||||
import type { JSX, PropsWithChildren } from 'react';
|
||||
|
||||
export interface SectionOptions {
|
||||
@@ -26,7 +26,8 @@ export function Section({
|
||||
className = '',
|
||||
buttonClassName = '',
|
||||
}: PropsWithChildren<SectionOptions>) {
|
||||
const disclosure = useDisclosureState({ defaultOpen: !defaultClosed });
|
||||
const disclosure = useDisclosureStore({ defaultOpen: !defaultClosed });
|
||||
const disclosureState = disclosure.getState();
|
||||
|
||||
return (
|
||||
<div className={`flex flex-col ${className}`}>
|
||||
@@ -36,7 +37,7 @@ export function Section({
|
||||
? 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-none focus:ring'
|
||||
}
|
||||
state={disclosure}
|
||||
store={disclosure}
|
||||
>
|
||||
<div className="flex flex-row place-content-between place-items-center">
|
||||
<div className="flex flex-row place-items-center gap-3">
|
||||
@@ -44,14 +45,14 @@ export function Section({
|
||||
<span className="font-semibold">{title}</span>
|
||||
</div>
|
||||
<VscChevronDown
|
||||
className={`transform transition duration-150 ease-in-out ${disclosure.open ? 'rotate-180' : 'rotate-0'}`}
|
||||
className={`transform transition duration-150 ease-in-out ${disclosureState.open ? 'rotate-180' : 'rotate-0'}`}
|
||||
size={20}
|
||||
/>
|
||||
</div>
|
||||
</Disclosure>
|
||||
<DisclosureContent
|
||||
className={`${background ? 'bg-light-700 dark:bg-dark-500 rounded' : ''} ${gutter ? 'mt-2' : ''}`}
|
||||
state={disclosure}
|
||||
store={disclosure}
|
||||
>
|
||||
{padded ? <div className="mx-2 px-0 py-5 md:mx-6.5 md:px-4.5">{children}</div> : children}
|
||||
</DisclosureContent>
|
||||
|
||||
Reference in New Issue
Block a user