diff --git a/apps/dashboard/src/app/page.tsx b/apps/dashboard/src/app/page.tsx index d4726fa..6971fc1 100644 --- a/apps/dashboard/src/app/page.tsx +++ b/apps/dashboard/src/app/page.tsx @@ -13,6 +13,7 @@ const initialElements: OGElement[] = [ { id: createElementId(), tag: 'div', + name: 'Box', x: 0, y: 0, width: 1200, diff --git a/apps/dashboard/src/components/EditorToolbar.tsx b/apps/dashboard/src/components/EditorToolbar.tsx index 831646a..88feeec 100644 --- a/apps/dashboard/src/components/EditorToolbar.tsx +++ b/apps/dashboard/src/components/EditorToolbar.tsx @@ -28,6 +28,7 @@ export function EditorToolbar() {
{ setSelectedElement(element.id); }} type="button" > - {element.tag === 'p' ? ( - <> - - {element.content.slice(0, 25)} - - ) : null} - {element.tag === 'div' && element.backgroundImage ? ( - <> - - Image - - ) : null} - {element.tag === 'div' && !element.backgroundImage && !element.radius ? ( - <> - - Box - - ) : null} - {element.tag === 'div' && !element.backgroundImage && element.radius ? ( - <> - - Rounded box - - ) : null} - {element.tag === 'span' ? ( - <> - - Dynamic text - - ) : null} + {element.tag === 'p' + ? + : null + } + {element.tag === 'div' && element.backgroundImage + ? + : null + } + {element.tag === 'div' && !element.backgroundImage && !element.radius + ? + : null + } + {element.tag === 'div' && !element.backgroundImage && element.radius + ? + : null + } + {element.tag === 'span' + ? + : null + } + {element.name}