Skip to content

Commit

Permalink
make links in environment card wrap
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsgstrabo committed Nov 25, 2024
1 parent 6b60ff4 commit 18ff6ba
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 31 deletions.
31 changes: 13 additions & 18 deletions src/components/environments-summary/environment-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,8 @@ const DeploymentDetails: FunctionComponent<{
deployment: Readonly<DeploymentSummary>;
}> = ({ appName, deployment }) =>
!deployment ? (
<Typography
color="disabled"
className="grid grid--auto-columns grid--gap-small grid--align-center"
>
<Icon data={link} />
<Typography color="disabled">
<Icon data={link} style={{ marginRight: 'var(--eds_spacing_small)' }} />
No active deployment
</Typography>
) : (
Expand All @@ -67,15 +64,13 @@ const DeploymentDetails: FunctionComponent<{
link
token={{ textDecoration: 'none' }}
>
<span className="grid grid--auto-columns grid--gap-small grid--align-center">
<Icon data={send} />
<Typography as="span" color="primary">
deployment{' '}
<Typography as="span" color="gray">
(<RelativeToNow time={new Date(deployment.activeFrom)} />)
</Typography>
<Icon data={send} style={{ marginRight: 'var(--eds_spacing_small)' }} />
<Typography as="span" color="primary">
deployment{' '}
<Typography as="span" color="gray">
(<RelativeToNow time={new Date(deployment.activeFrom)} />)
</Typography>
</span>
</Typography>
</Typography>
);

Expand Down Expand Up @@ -161,11 +156,11 @@ export const EnvironmentCard: FunctionComponent<EnvironmentCardProps> = ({
? {
header: <></>,
body: (
<Typography
color="disabled"
className="grid grid--auto-columns grid--gap-small grid--align-center"
>
<Icon data={link} />
<Typography color="disabled">
<Icon
data={link}
style={{ marginRight: 'var(--eds_spacing_small)' }}
/>
No link available
</Typography>
),
Expand Down
24 changes: 11 additions & 13 deletions src/components/environments-summary/environment-ingress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ const ComponentDetails: FunctionComponent<{
icon: IconData;
component: Readonly<Component>;
}> = ({ icon, component }) => (
<span className="grid grid--auto-columns grid--gap-small grid--align-center">
<Icon data={icon} />
<>
<Icon data={icon} style={{ marginRight: 'var(--eds_spacing_small)' }} />
<Typography
as="span"
token={{
Expand All @@ -46,7 +46,7 @@ const ComponentDetails: FunctionComponent<{
>
{component.name}
</Typography>
</span>
</>
);

export const EnvironmentIngress: FunctionComponent<EnvironmentIngressProps> = ({
Expand Down Expand Up @@ -82,21 +82,19 @@ export const EnvironmentIngress: FunctionComponent<EnvironmentIngressProps> = ({
<ExternalLink
key={component.name}
href={`https://${component.variables[URL_VAR_NAME]}`}
className="grid grid--auto-columns grid--gap-x-small grid--align-center"
className=""
>
<ComponentDetails icon={link} component={component} />
</ExternalLink>
))
) : (
<span>
<Typography
color="disabled"
className="grid grid--auto-columns grid--gap-small grid--align-center"
>
<Icon data={link} />
No link available
</Typography>
</span>
<Typography color="disabled">
<Icon
data={link}
style={{ marginRight: 'var(--eds_spacing_small)' }}
/>
No link available
</Typography>
)}
{comps.passive
.filter(({ status }) => status === 'Outdated')
Expand Down

0 comments on commit 18ff6ba

Please sign in to comment.