rename blocks to widgets

This commit is contained in:
Ren Amamiya
2023-08-11 15:25:33 +07:00
parent 0cfc3a48d8
commit 36b2acba6a
22 changed files with 118 additions and 107 deletions

View File

@@ -1,9 +1,9 @@
import { CancelIcon } from '@shared/icons';
import { useBlocks } from '@stores/blocks';
import { useWidgets } from '@stores/widgets';
export function TitleBar({ id, title }: { id?: string; title: string }) {
const removeBlock = useBlocks((state) => state.removeBlock);
const remove = useWidgets((state) => state.removeWidget);
return (
<div
@@ -15,7 +15,7 @@ export function TitleBar({ id, title }: { id?: string; title: string }) {
{id ? (
<button
type="button"
onClick={() => removeBlock(id)}
onClick={() => remove(id)}
className="inline-flex h-6 w-6 shrink translate-y-8 transform items-center justify-center rounded transition-transform duration-150 ease-in-out hover:bg-white/10 group-hover:translate-y-0"
>
<CancelIcon className="h-3 w-3 text-white" />