Add new text button and expand sidebar functionality in App.tsx
This commit is contained in:
31
src/App.tsx
31
src/App.tsx
@@ -1442,15 +1442,30 @@ export default function App() {
|
|||||||
<main className="workspace">
|
<main className="workspace">
|
||||||
<div className="workspace__body">
|
<div className="workspace__body">
|
||||||
{!selectedTextId ? (
|
{!selectedTextId ? (
|
||||||
<div className="empty-state">
|
<>
|
||||||
<div className="empty-state__title">Create your first text</div>
|
<div className="empty-state">
|
||||||
<div className="empty-state__subtitle">
|
<div className="empty-state__title">Create your first text</div>
|
||||||
Everything stays offline in a single SQLite database.
|
<div className="empty-state__subtitle">
|
||||||
|
Everything stays offline in a single SQLite database.
|
||||||
|
</div>
|
||||||
|
<button className="button button--primary" onClick={handleNewText}>
|
||||||
|
New Text
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<button className="button button--primary" onClick={handleNewText}>
|
{sidebarCollapsed ? (
|
||||||
New Text
|
<div className="editor__footer">
|
||||||
</button>
|
<button
|
||||||
</div>
|
className="icon-button"
|
||||||
|
onClick={() => setSidebarCollapsed(false)}
|
||||||
|
aria-label="Expand sidebar"
|
||||||
|
title="Expand sidebar"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<span className="icon-button__glyph" aria-hidden="true">▶</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
|
</>
|
||||||
) : (
|
) : (
|
||||||
<div
|
<div
|
||||||
className={`workspace__content${
|
className={`workspace__content${
|
||||||
|
|||||||
Reference in New Issue
Block a user