Center collapsed navigation items and standardize sidebar row heights
This commit is contained in:
1 parent
8a438e10ae
commit
668a03f210
4 files changed
+26
-11
No files matched your search
@@ -86,10 +86,15 @@ export function SideNav(props: any) {
|
||||
<Row
|
||||
alignItems="center"
|
||||
justifyContent="space-between"
|
||||
minHeight="40px"
|
||||
minHeight="9"
|
||||
style={{ flexShrink: 0 }}
|
||||
>
|
||||
<Row padding="3" alignItems="center" justifyContent="space-between" flexGrow="1">
|
||||
<Row
|
||||
padding="3"
|
||||
alignItems="center"
|
||||
justifyContent={isCollapsed ? 'center' : 'space-between'}
|
||||
flexGrow="1"
|
||||
>
|
||||
{!isCollapsed && (
|
||||
<IconLabel icon={<Logo />}>
|
||||
<Text weight="bold">umami</Text>
|
||||
@@ -113,10 +118,11 @@ export function SideNav(props: any) {
|
||||
<Row
|
||||
tabIndex={0}
|
||||
alignItems="center"
|
||||
justifyContent={isCollapsed ? 'center' : undefined}
|
||||
hover={{ backgroundColor: 'surface-sunken' }}
|
||||
backgroundColor={isSelected ? 'surface-sunken' : undefined}
|
||||
borderRadius
|
||||
minHeight="40px"
|
||||
minHeight="9"
|
||||
>
|
||||
<IconLabel
|
||||
icon={icon}
|
||||
@@ -142,7 +148,12 @@ export function SideNav(props: any) {
|
||||
</Column>
|
||||
)}
|
||||
</Column>
|
||||
<Row paddingTop="2" width="100%" style={{ flexShrink: 0 }}>
|
||||
<Row
|
||||
paddingTop="2"
|
||||
width="100%"
|
||||
justifyContent={isCollapsed ? 'center' : undefined}
|
||||
style={{ flexShrink: 0 }}
|
||||
>
|
||||
<UserButton showText={!isCollapsed} />
|
||||
</Row>
|
||||
</Column>
|
||||
|
||||
@@ -54,7 +54,7 @@ export function AdminNav({ onItemClick }: { onItemClick?: () => void }) {
|
||||
alignItems="center"
|
||||
hover={{ backgroundColor: 'surface-sunken' }}
|
||||
borderRadius
|
||||
minHeight="40px"
|
||||
minHeight="9"
|
||||
>
|
||||
<IconLabel icon={<ArrowLeft />} label={t(labels.back)} padding />
|
||||
</Row>
|
||||
|
||||
@@ -63,9 +63,10 @@ export function SettingsNav({
|
||||
<Row
|
||||
tabIndex={0}
|
||||
alignItems="center"
|
||||
justifyContent={isCollapsed ? 'center' : undefined}
|
||||
hover={{ backgroundColor: 'surface-sunken' }}
|
||||
borderRadius
|
||||
minHeight="40px"
|
||||
minHeight="9"
|
||||
>
|
||||
<IconLabel icon={<ArrowLeft />} label={isCollapsed ? '' : t(labels.back)} padding />
|
||||
</Row>
|
||||
@@ -94,10 +95,11 @@ export function SettingsNav({
|
||||
<Row
|
||||
tabIndex={0}
|
||||
alignItems="center"
|
||||
justifyContent={isCollapsed ? 'center' : undefined}
|
||||
hover={{ backgroundColor: 'surface-sunken' }}
|
||||
backgroundColor={isSelected ? 'surface-sunken' : undefined}
|
||||
borderRadius
|
||||
minHeight="40px"
|
||||
minHeight="9"
|
||||
>
|
||||
<IconLabel
|
||||
icon={icon}
|
||||
|
||||
@@ -25,9 +25,10 @@ export function WebsiteNav({
|
||||
<Row
|
||||
tabIndex={0}
|
||||
alignItems="center"
|
||||
justifyContent="center"
|
||||
hover={{ backgroundColor: 'surface-sunken' }}
|
||||
borderRadius
|
||||
minHeight="40px"
|
||||
minHeight="9"
|
||||
>
|
||||
<IconLabel icon={<ArrowLeft />} label="" padding />
|
||||
</Row>
|
||||
@@ -38,7 +39,7 @@ export function WebsiteNav({
|
||||
alignItems="center"
|
||||
hover={{ backgroundColor: 'surface-sunken' }}
|
||||
borderRadius
|
||||
minHeight="40px"
|
||||
minHeight="9"
|
||||
>
|
||||
<IconLabel icon={<ArrowLeft />} label={t(labels.back)} padding />
|
||||
</Row>
|
||||
@@ -60,10 +61,11 @@ export function WebsiteNav({
|
||||
<Row
|
||||
tabIndex={0}
|
||||
alignItems="center"
|
||||
justifyContent="center"
|
||||
hover={{ backgroundColor: 'surface-sunken' }}
|
||||
backgroundColor={isSelected ? 'surface-sunken' : undefined}
|
||||
borderRadius
|
||||
minHeight="40px"
|
||||
minHeight="9"
|
||||
>
|
||||
<IconLabel
|
||||
icon={icon}
|
||||
@@ -80,7 +82,7 @@ export function WebsiteNav({
|
||||
hover={{ backgroundColor: 'surface-sunken' }}
|
||||
backgroundColor={isSelected ? 'surface-sunken' : undefined}
|
||||
borderRadius
|
||||
minHeight="40px"
|
||||
minHeight="9"
|
||||
>
|
||||
<IconLabel
|
||||
icon={icon}
|
||||
|
||||
Reference in new issue
Block a user