Skip to content

Commit 8e087ce

Browse files
authored
fix(KERN): replace KernStandaloneLink component by a link tag, fix styling, remove unused files, fix icon shrink (#3172)
1 parent dbc7da2 commit 8e087ce

File tree

5 files changed

+17
-110
lines changed

5 files changed

+17
-110
lines changed

app/components/kern/KernStandaloneLink.tsx

Lines changed: 0 additions & 49 deletions
This file was deleted.

app/components/kern/common/KernIcon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function KernIcon({
1212
}: Readonly<IconProps>) {
1313
return (
1414
<svg
15-
className={`app-icon ${className}`}
15+
className={`app-icon ${className} flex-shrink-0`}
1616
width={size}
1717
height={size}
1818
fill="currentColor"

app/components/kern/layout/KernBreadcrumbs.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Grid } from "~/components/layout/grid/Grid";
22
import { GridItem } from "~/components/layout/grid/GridItem";
33
import { GridSection } from "~/components/layout/grid/GridSection";
4-
import { KernStandaloneLink } from "../KernStandaloneLink";
54
import { KernIcon } from "~/components/kern/common/KernIcon";
65

76
type KernBreadcrumb = {
@@ -53,11 +52,12 @@ export default function KernBreadcrumbs({
5352
{breadcrumb.title}
5453
</span>
5554
) : (
56-
<KernStandaloneLink
57-
text={breadcrumb.title ?? ""}
58-
url={breadcrumb.url ?? ""}
59-
className="increase-tap-area text-kern-16 p-0!"
60-
/>
55+
<a
56+
href={breadcrumb.url ?? ""}
57+
className="increase-tap-area kern-link kern-link--small p-0!"
58+
>
59+
{breadcrumb.title ?? ""}
60+
</a>
6161
)}
6262
</div>
6363
))}

app/components/kern/navigation/SideNavMobile.tsx

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,9 @@ import {
88
stateIsActive,
99
stateIsWarning,
1010
} from "~/services/navigation/navState";
11-
import KeyboardArrowLeft from "@digitalservicebund/icons/KeyboardArrowLeft";
12-
import SvgWarningAmber from "@digitalservicebund/icons/WarningAmberRounded";
1311
import { getMobileButtonAreaTitles } from "~/components/navigation/getMobileButtonAreaTitles";
1412
import classNames from "classnames";
1513
import { KernIcon } from "../common/KernIcon";
16-
import { KernStandaloneLink } from "../KernStandaloneLink";
1714

1815
const DATA_TESTID_STEP_STEPPER_LINK = "step-stepper-link";
1916

@@ -39,19 +36,19 @@ const StepStepperLinks = ({
3936
const isWarningStep = stateIsWarning(step.state);
4037
return (
4138
<div className="flex flex-row pl-16 pr-0 pb-16" key={step.label}>
42-
<KernStandaloneLink
43-
url={step.href}
39+
<a
40+
href={step.href}
4441
className="truncate text-left mw-[70vw]"
45-
icon={<KeyboardArrowLeft className="inline" />}
46-
text={`${translations.navigationMobile.toStep.de} ${step.label} (${step.stepIndex}/${stepsStepper.length})`}
47-
dataTestid={DATA_TESTID_STEP_STEPPER_LINK}
42+
data-testid={DATA_TESTID_STEP_STEPPER_LINK}
4843
aria-describedby={isWarningStep ? step.href : undefined}
49-
/>
44+
>
45+
<KernIcon name="chevron-left" className="inline" />
46+
{`${translations.navigationMobile.toStep.de} ${step.label} (${step.stepIndex}/${stepsStepper.length})`}
47+
</a>
5048
{isWarningStep && (
51-
<SvgWarningAmber
52-
data-testid="icon-warning"
53-
className="pl-2"
54-
id={step.href}
49+
<KernIcon
50+
name="warning"
51+
className="pl-2 fill-kern-feedback-warning!"
5552
aria-label={translations.navigation.navigationItemWarning.de}
5653
/>
5754
)}

stories/kern/KernStandaloneLink.stories.tsx

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)