ui(admin): fix users list

This commit is contained in:
Matthew Penner 2023-01-25 11:14:39 -07:00
parent 5063db7d95
commit 4b82ca1042
No known key found for this signature in database
5 changed files with 126 additions and 92 deletions

View file

@ -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 };