Skip to content

Commit e2ee558

Browse files
committed
add heading and update styles
1 parent 21ba061 commit e2ee558

File tree

2 files changed

+42
-23
lines changed

2 files changed

+42
-23
lines changed

src/features/encoder/components/encoded-jwt-output.component.tsx

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { HomeDictionaryModel } from "@/features/localization/models/home-diction
66
import { dataTestidDictionary } from "@/libs/testing/data-testid.dictionary";
77
import { CardToolbarComponent } from "@/features/common/components/card-toolbar/card-toolbar.component";
88
import { CardToolbarCopyButtonComponent } from "@/features/common/components/card-toolbar-buttons/card-toolbar-copy-button/card-toolbar-copy-button.component";
9+
import styles from "./encoded-jwt-output.module.scss";
910

1011
type EncodedJwtOutputComponentProps = {
1112
languageCode: string;
@@ -20,28 +21,32 @@ export const EncodedJwtOutputComponent: React.FC<
2021
const encodingErrors = useEncoderStore((state) => state.encodingErrors);
2122

2223
return (
23-
<CardComponent
24-
id={dataTestidDictionary.encoder.jwt.id}
25-
languageCode={languageCode}
26-
title={dictionary.title}
27-
compactTitle={dictionary.title}
28-
options={{ noPadding: true, fullHeight: true, isOutput: true }}
29-
messages={{
30-
warnings: encodingWarnings,
31-
errors: encodingErrors,
32-
}}
33-
slots={{
34-
toolbar: (
35-
<CardToolbarComponent ariaLabel={"JWT editor toolbar"}>
36-
<CardToolbarCopyButtonComponent
37-
languageCode={languageCode}
38-
value={encodedToken$ || ""}
39-
/>
40-
</CardToolbarComponent>
41-
),
42-
}}
43-
>
44-
<EncodedTokenComponent encodedToken={encodedToken$ || ""} />
45-
</CardComponent>
24+
<>
25+
<h4 className={styles.headline}>{dictionary.heading}</h4>
26+
<CardComponent
27+
id={dataTestidDictionary.encoder.jwt.id}
28+
languageCode={languageCode}
29+
title={dictionary.title}
30+
hasHeaderIcon
31+
compactTitle={dictionary.title}
32+
options={{ noPadding: false, fullHeight: true, isOutput: true }}
33+
messages={{
34+
warnings: encodingWarnings,
35+
errors: encodingErrors,
36+
}}
37+
slots={{
38+
toolbar: (
39+
<CardToolbarComponent ariaLabel={"JWT editor toolbar"}>
40+
<CardToolbarCopyButtonComponent
41+
languageCode={languageCode}
42+
value={encodedToken$ || ""}
43+
/>
44+
</CardToolbarComponent>
45+
),
46+
}}
47+
>
48+
<EncodedTokenComponent encodedToken={encodedToken$ || ""} />
49+
</CardComponent>
50+
</>
4651
);
4752
};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
@use "@/libs/theme/styles/variables" as *;
2+
@use "@/libs/theme/styles/mixins" as *;
3+
4+
.headline {
5+
display: flex;
6+
grid-column: 1/-1;
7+
width: 100%;
8+
font-size: 1rem;
9+
font-weight: 700;
10+
line-height: 1.15;
11+
letter-spacing: -.1px;
12+
color: var(--color_fg_default);
13+
padding-bottom: 0.5rem;
14+
}

0 commit comments

Comments
 (0)