feat(left-sidebar): add simpler tooltips
This commit is contained in:
parent
879d6916f1
commit
2e6ab6f06a
|
@ -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>
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue