refactor(workbench): add slider to switch between code or preview (#12)

This commit is contained in:
Dominic Elm
2024-07-25 16:34:27 +02:00
committed by GitHub
parent 5db834e2f7
commit a5ed695cb3
4 changed files with 134 additions and 33 deletions

View File

@@ -36,13 +36,6 @@ export const Preview = memo(() => {
return (
<div className="w-full h-full flex flex-col">
<div className="bg-gray-100 rounded-t-lg p-2 flex items-center space-x-1.5">
<div className="flex items-center gap-2 text-gray-800">
<div className="i-ph:app-window-duotone scale-130 ml-1.5" />
<span className="text-sm">Preview</span>
</div>
<div className="flex-grow" />
</div>
<div className="bg-white p-2 flex items-center gap-1.5">
<IconButton icon="i-ph:arrow-clockwise" onClick={reloadPreview} />
<div className="flex items-center gap-1 flex-grow bg-gray-100 rounded-full px-3 py-1 text-sm text-gray-600 hover:bg-gray-200 hover:focus-within:bg-white focus-within:bg-white focus-within:ring-2 focus-within:ring-accent">