Change design for icons in 'MainNavbar' and 'Pageheader' (#1560)
* adjusted MainNavbar icons size from 'md' to 'sm' * reduced CollapseButton size from 32px to 24px * Added margin-left of 4px to the left chevron icon * removed 8px padding * updated the stroke for the NavItem
This commit is contained in:
@ -44,6 +44,7 @@ const StyledTitleContainer = styled.div`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const StyledTopBarButtonContainer = styled.div`
|
const StyledTopBarButtonContainer = styled.div`
|
||||||
|
margin-left: ${({ theme }) => theme.spacing(1)};
|
||||||
margin-right: ${({ theme }) => theme.spacing(1)};
|
margin-right: ${({ theme }) => theme.spacing(1)};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -51,11 +52,14 @@ const StyledBackIconButton = styled(IconButton)`
|
|||||||
margin-right: ${({ theme }) => theme.spacing(1)};
|
margin-right: ${({ theme }) => theme.spacing(1)};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const StyledTopBarIconStyledTitleContainer = styled.div`
|
const StyledTopBarIconStyledTitleContainer = styled.div<{
|
||||||
|
hideLeftPadding?: boolean;
|
||||||
|
}>`
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
padding-left: ${({ theme }) => theme.spacing(2)};
|
padding-left: ${({ theme, hideLeftPadding }) =>
|
||||||
|
hideLeftPadding ? theme.spacing(2) : undefined};
|
||||||
width: 100%;
|
width: 100%;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -104,7 +108,7 @@ export function PageHeader({
|
|||||||
/>
|
/>
|
||||||
</StyledTopBarButtonContainer>
|
</StyledTopBarButtonContainer>
|
||||||
)}
|
)}
|
||||||
<StyledTopBarIconStyledTitleContainer>
|
<StyledTopBarIconStyledTitleContainer hideLeftPadding={!hasBackButton}>
|
||||||
{Icon && <Icon size={theme.icon.size.md} />}
|
{Icon && <Icon size={theme.icon.size.md} />}
|
||||||
<StyledTitleContainer data-testid="top-bar-title">
|
<StyledTitleContainer data-testid="top-bar-title">
|
||||||
<OverflowingTextWithTooltip text={title} />
|
<OverflowingTextWithTooltip text={title} />
|
||||||
|
|||||||
@ -7,7 +7,6 @@ import {
|
|||||||
IconLayoutSidebarRightCollapse,
|
IconLayoutSidebarRightCollapse,
|
||||||
} from '@/ui/icon';
|
} from '@/ui/icon';
|
||||||
import { isNavbarOpenedState } from '@/ui/layout/states/isNavbarOpenedState';
|
import { isNavbarOpenedState } from '@/ui/layout/states/isNavbarOpenedState';
|
||||||
import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';
|
|
||||||
|
|
||||||
const StyledCollapseButton = styled.div<{
|
const StyledCollapseButton = styled.div<{
|
||||||
hide: boolean;
|
hide: boolean;
|
||||||
@ -25,14 +24,14 @@ const StyledCollapseButton = styled.div<{
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 32px;
|
height: 24px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
user-select: none;
|
user-select: none;
|
||||||
visibility: ${({ hide }) => (hide ? 'visible' : 'hidden')};
|
visibility: ${({ hide }) => (hide ? 'visible' : 'hidden')};
|
||||||
width: 32px;
|
width: 24px;
|
||||||
|
|
||||||
@keyframes fadeIn {
|
@keyframes fadeIn {
|
||||||
0% {
|
0% {
|
||||||
@ -56,7 +55,7 @@ export default function NavCollapseButton({
|
|||||||
const [isNavbarOpened, setIsNavbarOpened] =
|
const [isNavbarOpened, setIsNavbarOpened] =
|
||||||
useRecoilState(isNavbarOpenedState);
|
useRecoilState(isNavbarOpenedState);
|
||||||
|
|
||||||
const iconSize = useIsMobile() ? 'small' : 'medium';
|
const iconSize = 'small';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@ -134,7 +134,7 @@ function NavItem({
|
|||||||
danger={danger}
|
danger={danger}
|
||||||
soon={soon}
|
soon={soon}
|
||||||
>
|
>
|
||||||
{Icon && <Icon size={theme.icon.size.md} />}
|
{Icon && <Icon size={theme.icon.size.md} stroke={theme.icon.stroke.sm} />}
|
||||||
<StyledItemLabel>{label}</StyledItemLabel>
|
<StyledItemLabel>{label}</StyledItemLabel>
|
||||||
{soon && <StyledSoonPill>Soon</StyledSoonPill>}
|
{soon && <StyledSoonPill>Soon</StyledSoonPill>}
|
||||||
{!!count && <StyledItemCount>{count}</StyledItemCount>}
|
{!!count && <StyledItemCount>{count}</StyledItemCount>}
|
||||||
|
|||||||
Reference in New Issue
Block a user