rename blocks to widgets
This commit is contained in:
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user