feat(left-sidebar): add simpler tooltips

This commit is contained in:
RadoslavDimchev 2024-04-10 16:56:51 +03:00 committed by Radoslav Dimchev
parent 879d6916f1
commit 2e6ab6f06a
2 changed files with 6 additions and 6 deletions

View File

@ -56,10 +56,7 @@ const LeftSidebar = () => {
content={
<XStack alignItems="center" space="$1">
<Text size={15} weight="semibold">
{button.path
.replace(/-/g, ' ')
.slice(1)
.replace(/^\w/, (c: any) => c.toUpperCase())}
{button.tooltip}
</Text>
</XStack>
}

View File

@ -4,6 +4,7 @@ interface SidebarButton {
isDotOn: boolean
isDisabled?: boolean
path: string
tooltip?: string
}
interface LeftSidebarState {
@ -12,10 +13,11 @@ interface LeftSidebarState {
const initialState: LeftSidebarState = {
buttons: [
{ isDotOn: false, path: '/dashboard' },
{ isDotOn: false, path: '/dashboard', tooltip: 'Dashboard' },
{
isDotOn: false,
path: '/validator-management',
tooltip: 'Validator Management',
},
{
isDotOn: false,
@ -25,8 +27,9 @@ const initialState: LeftSidebarState = {
{
isDotOn: false,
path: '/device-health-check',
tooltip: 'Device Health Check',
},
{ isDotOn: false, path: '/logs' },
{ isDotOn: false, path: '/logs', tooltip: 'Logs' },
{
isDotOn: false,
isDisabled: true,