mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-09 23:45:21 +02:00
Merge pull request #180 from aditya-67/fix-profile-icon
This commit is contained in:
commit
df7e83efe7
3 changed files with 3 additions and 7 deletions
|
@ -193,7 +193,7 @@ export function DesktopLayout({ children, sidebar }: DesktopLayoutProps) {
|
|||
<MenuPopover
|
||||
isHeader={false}
|
||||
icon={<ProfileCircle />}
|
||||
buttonClassName="w-12 h-12 rounded-full"
|
||||
placement={'right-end'}
|
||||
/>
|
||||
</div>
|
||||
</nav>
|
||||
|
|
|
@ -6,24 +6,19 @@ import {
|
|||
RiShutDownLine as LogoutIcon,
|
||||
RiDatabase2Line,
|
||||
} from 'react-icons/ri'
|
||||
import classNames from 'classnames'
|
||||
|
||||
export function MenuPopover({
|
||||
icon,
|
||||
buttonClassName,
|
||||
placement = 'top-end',
|
||||
isHeader,
|
||||
}: {
|
||||
icon: JSX.Element
|
||||
buttonClassName?: string
|
||||
placement?: ComponentProps<typeof Menu.Item>['placement']
|
||||
isHeader: boolean
|
||||
}) {
|
||||
return (
|
||||
<Menu>
|
||||
<Menu.Button variant="icon" className={classNames(buttonClassName)}>
|
||||
{icon}
|
||||
</Menu.Button>
|
||||
<Menu.Button variant="profileIcon">{icon}</Menu.Button>
|
||||
<Menu.Items
|
||||
placement={placement}
|
||||
className={isHeader ? 'bg-gray-600' : 'min-w-[200px]'}
|
||||
|
|
|
@ -10,6 +10,7 @@ const ButtonVariants = Object.freeze({
|
|||
input: 'px-4 py-2 rounded text-base bg-transparent text-gray-25 border border-gray-200 shadow focus:bg-gray-500 focus:ring-gray-400',
|
||||
link: 'px-4 py-2 rounded text-base text-cyan hover:text-cyan-400 focus:text-cyan-300 focus:ring-cyan',
|
||||
icon: 'p-0 w-8 h-8 rounded text-2xl text-gray-25 hover:bg-gray-300 focus:bg-gray-200 focus:ring-gray-400',
|
||||
profileIcon: 'p-0 w-12 h-12 rounded text-2xl text-gray-25',
|
||||
danger: 'px-4 py-2 rounded text-base bg-red text-gray-700 shadow hover:bg-red-400 focus:bg-red-400 focus:ring-red',
|
||||
warn: 'px-4 py-2 rounded text-base bg-gray-500 text-red-500 shadow hover:bg-gray-400 focus:bg-gray-400 focus:ring-red',
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue