Tweak panel toolbars

See this thread:
https://discord.com/channels/775984095250612234/775984095250612240/853751444703543326

Related to #360
This commit is contained in:
Kurt Hutten
2021-06-14 08:35:59 +10:00
parent d3cb93b218
commit b65c4530b2
8 changed files with 70 additions and 54 deletions

View File

@@ -5,19 +5,19 @@ import Svg from 'src/components/Svg/Svg'
const PanelToolbar = ({ panelName }: { panelName: string }) => {
const { mosaicWindowActions } = useContext(MosaicWindowContext)
return (
<div className="absolute top-0 left-0 flex items-center h-9">
{mosaicWindowActions.connectDragSource(
<div className=" text-gray-500 bg-gray-300 cursor-grab px-2 h-full flex items-center">
<Svg name="drag-grid" className="w-4 p-px" />
</div>
)}
<div className="absolute top-0 right-0 flex items-center h-9">
<button
className="bg-gray-500 text-gray-300 px-3 rounded-br-lg h-full cursor-not-allowed"
className="bg-gray-500 text-gray-300 px-3 rounded-bl-lg h-full cursor-not-allowed"
aria-label={`${panelName} settings`}
disabled
>
<Svg name="gear" className="w-7 p-px" />
</button>
{mosaicWindowActions.connectDragSource(
<div className=" text-gray-500 bg-gray-300 cursor-grab px-2 h-full flex items-center">
<Svg name="drag-grid" className="w-4 p-px" />
</div>
)}
</div>
)
}