ui(admin): fix users list
This commit is contained in:
parent
5063db7d95
commit
4b82ca1042
5 changed files with 126 additions and 92 deletions
|
@ -1,24 +1,29 @@
|
|||
import classNames from 'classnames';
|
||||
import styles from '@/components/elements/dropdown/style.module.css';
|
||||
import { ChevronDownIcon } from '@heroicons/react/solid';
|
||||
import { Menu } from '@headlessui/react';
|
||||
import * as React from 'react';
|
||||
import { ChevronDownIcon } from '@heroicons/react/solid';
|
||||
import classNames from 'classnames';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
import styles from './style.module.css';
|
||||
|
||||
interface Props {
|
||||
className?: string;
|
||||
animate?: boolean;
|
||||
children: React.ReactNode;
|
||||
children: ReactNode;
|
||||
}
|
||||
|
||||
export default ({ className, animate = true, children }: Props) => (
|
||||
<Menu.Button className={classNames(styles.button, className || 'px-4')}>
|
||||
{typeof children === 'string' ? (
|
||||
<>
|
||||
<span className={'mr-2'}>{children}</span>
|
||||
<ChevronDownIcon aria-hidden={'true'} data-animated={animate.toString()} />
|
||||
</>
|
||||
) : (
|
||||
children
|
||||
)}
|
||||
</Menu.Button>
|
||||
);
|
||||
function DropdownButton({ className, animate = true, children }: Props) {
|
||||
return (
|
||||
<Menu.Button className={classNames(styles.button, className ?? 'px-4')}>
|
||||
{typeof children === 'string' ? (
|
||||
<>
|
||||
<span className="mr-2">{children}</span>
|
||||
<ChevronDownIcon aria-hidden="true" data-animated={animate.toString()} />
|
||||
</>
|
||||
) : (
|
||||
children
|
||||
)}
|
||||
</Menu.Button>
|
||||
);
|
||||
}
|
||||
|
||||
export { DropdownButton };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue