Skip to content

Commit

Permalink
feat: add hover to cards and fix sidepanel bottom margin (#457)
Browse files Browse the repository at this point in the history
  • Loading branch information
wesbillman authored Oct 5, 2023
1 parent 23716b1 commit d90132e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion console/client/src/components/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const Card = ({ topBarColor, className, onClick, children }: Props) => {
<div
onClick={onClick}
className={`relative rounded-md border border-gray-200 dark:border-gray-500 ${
onClick ? 'cursor-pointer' : ''
onClick ? 'cursor-pointer hover:bg-gray-100 dark:hover:bg-slate-700' : ''
} ${className}`}
>
{topBarColor && (
Expand Down
8 changes: 3 additions & 5 deletions console/client/src/layout/SidePanel.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { Transition } from '@headlessui/react'
import { Fragment, useContext } from 'react'
import { SidePanelContext } from '../providers/side-panel-provider'
import { sidePanelColor } from '../utils/style.utils'
import { bgColor, textColor } from '../utils'
import { sidePanelColor } from '../utils/style.utils'

export const SidePanel = () => {
const { isOpen, component } = useContext(SidePanelContext)

return (
<div className={`absolute z-20 top-0 ${bgColor} ${textColor}`}>
<div className={`absolute z-20 top-0 border border-red-500 ${bgColor} ${textColor}`}>
<Transition
show={isOpen}
as={Fragment}
Expand All @@ -22,9 +22,7 @@ export const SidePanel = () => {
<div
className={`fixed right-0 w-1/3 h-full ${sidePanelColor} dark:bg-slate-800 dark:shadow-black-600 shadow-2xl`}
>
<div className='overflow-y-auto' style={{ maxHeight: 'calc(100vh - 2rem)' }}>
{component}
</div>
<div className='overflow-y-auto h-full'>{component}</div>
</div>
</Transition>
</div>
Expand Down

0 comments on commit d90132e

Please sign in to comment.