Skip to content

Commit

Permalink
fix: header subtitle overflow
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <tukon479@gmail.com>
  • Loading branch information
Innei committed Dec 24, 2022
1 parent 77301f0 commit ac95920
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions src/components/layouts/BasicLayout/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,15 @@ export const Header: FC = observer(() => {
)}
>
<div
className={classNames(styles['head-swiper'], 'justify-between')}
className={classNames(
styles['head-swiper'],
'justify-between min-w-0',
)}
ref={appHeaderRef}
>
<div
className={
'flex items-center justify-center cursor-pointer select-none'
'flex items-center justify-center cursor-pointer select-none min-w-0'
}
onClick={clickFunc}
>
Expand Down
6 changes: 3 additions & 3 deletions src/components/layouts/BasicLayout/Header/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,21 @@
}

.header-title-wrapper {
@apply flex flex-col ml-4 py-2 box-border justify-center;
@apply flex flex-col ml-4 py-2 box-border justify-center min-w-0;

height: 4rem;
}

.title {
@apply relative inline-block text-xl font-medium mt-0 truncate flex-shrink-0;
@apply relative inline-block text-xl font-medium mt-0 truncate flex-shrink-0 min-w-0;

&.title-has-sub {
@apply text-lg;
}
}

.subtitle {
@apply text-sm text-gray-2;
@apply text-sm text-gray-2 flex-1 min-w-0 truncate;

margin-top: -0.3rem;
}
Expand Down

0 comments on commit ac95920

Please sign in to comment.