Skip to content

Commit

Permalink
style: add missing noWrap for some titles
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Mar 13, 2024
1 parent fd5225f commit ec19c5e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
10 changes: 6 additions & 4 deletions src/GZCTF/ClientApp/src/components/ChallengeDetailModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,16 @@ const ChallengeDetailModal: FC<ChallengeDetailModalProps> = (props) => {
},
}}
title={
<Group w="100%" position="apart">
<Group>
<Group noWrap w="100%" position="apart" spacing="sm">
<Group noWrap spacing="sm">
{tagData && (
<Icon path={tagData.icon} size={1} color={theme.colors[tagData?.color][5]} />
)}
<Title order={4}>{challenge?.title ?? title}</Title>
<Title w="calc(100% - 1.5rem)" order={4} lineClamp={1}>
{challenge?.title ?? title}
</Title>
</Group>
<Text fw={700} ff={theme.fontFamilyMonospace}>
<Text miw="5em" fw={700} ff={theme.fontFamilyMonospace}>
{challenge?.score ?? score} pts
</Text>
</Group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,16 @@ const ChallengePreviewModal: FC<ChallengePreviewModalProps> = (props) => {
},
}}
title={
<Group w="100%" position="apart">
<Group>
<Group noWrap w="100%" position="apart" spacing="sm">
<Group noWrap spacing="sm">
{tagData && (
<Icon path={tagData.icon} size={1} color={theme.colors[tagData?.color][5]} />
)}
<Title order={4}>{challenge?.title ?? ''}</Title>
<Title w="calc(100% - 1.5rem)" order={4} lineClamp={1}>
{challenge?.title ?? ''}
</Title>
</Group>
<Text fw={700} ff={theme.fontFamilyMonospace}>
<Text miw="5em" fw={700} ff={theme.fontFamilyMonospace}>
{challenge?.originalScore ?? 500} pts
</Text>
</Group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const WithGameEditTab: FC<GameEditTabProps> = ({
>
{t('admin.button.back')}
</Button>
<Group position={contentPos ?? 'apart'} w="calc(100% - 10rem)">
<Group noWrap position={contentPos ?? 'apart'} w="calc(100% - 10rem)">
{head}
</Group>
</>
Expand Down

0 comments on commit ec19c5e

Please sign in to comment.