From 546a88ec37073840e98ed689f7139d04985e861c Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Mon, 11 Oct 2021 01:13:10 +0200 Subject: feat(preview): ui redo --- components/Sidebar/Toolbar.tsx | 102 +++++++++++++++++++++++------------------ 1 file changed, 57 insertions(+), 45 deletions(-) (limited to 'components/Sidebar/Toolbar.tsx') diff --git a/components/Sidebar/Toolbar.tsx b/components/Sidebar/Toolbar.tsx index f6f1e39..8741da5 100644 --- a/components/Sidebar/Toolbar.tsx +++ b/components/Sidebar/Toolbar.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { Text, Flex, IconButton } from '@chakra-ui/react' +import { Text, Flex, IconButton, ButtonGroup, Tooltip } from '@chakra-ui/react' import { BiAlignJustify, BiAlignLeft, @@ -38,53 +38,65 @@ export const Toolbar = (props: ToolbarProps) => { nextPreviewNode, } = props return ( - + - } - aria-label="Previous node" - disabled={!canUndo} - onClick={() => previousPreviewNode()} - /> - } - aria-label="Next node" - disabled={!canRedo} - onClick={() => nextPreviewNode()} - /> + + + } + aria-label="Previous node" + disabled={!canUndo} + onClick={() => previousPreviewNode()} + /> + + + } + aria-label="Next node" + disabled={!canRedo} + onClick={() => nextPreviewNode()} + /> + + - , - , - , - , - ][justification] - } - onClick={() => setJustification((curr: number) => (curr + 1) % 4)} - /> - } - onClick={() => { - setIndent((curr: number) => (curr ? 0 : 1)) - }} - /> - } - onClick={() => { - setFont((curr: string) => (curr === 'sans serif' ? 'serif' : 'sans serif')) - }} - /> + + , + , + , + , + ][justification] + } + onClick={() => setJustification((curr: number) => (curr + 1) % 4)} + /> + + {/* + } + onClick={() => { + setIndent((curr: number) => (curr ? 0 : 1)) + }} + /> + + + } + onClick={() => { + setFont((curr: string) => (curr === 'sans serif' ? 'serif' : 'sans serif')) + }} + /> + */} ) -- cgit v1.2.3