|
1 | 1 | import React, { PropsWithChildren, useId } from "react"; |
2 | 2 | import styles from "./card.module.scss"; |
3 | 3 | import { clsx } from "clsx"; |
4 | | -import { getLocalizedSecondaryFont, MonoFont } from "@/libs/theme/fonts"; |
| 4 | +import { getLocalizedSecondaryFont } from "@/libs/theme/fonts"; |
5 | 5 | import { CardMessageComponent } from "@/features/common/components/card-message/card-message.component"; |
6 | 6 | import { HeaderIcon } from "../icons/header/header-icon"; |
7 | 7 | import { CheckIcon } from "../icons/check/check-icon"; |
| 8 | +import { EncodingFormatToggleSwitchComponent } from "@/features/decoder/components/encoding-format-toggle-swith/encoding-format-toggle-switch"; |
8 | 9 |
|
9 | 10 | export interface CardComponentProps extends PropsWithChildren { |
10 | 11 | id: string; |
@@ -151,8 +152,8 @@ export const CardComponent: React.FC<CardComponentProps> = (props) => { |
151 | 152 | {messages.success.map((line, index) => { |
152 | 153 | return ( |
153 | 154 | <> |
154 | | - <CheckIcon /> |
155 | | - <CardMessageComponent key={index}>{line}</CardMessageComponent> |
| 155 | + <CheckIcon /> |
| 156 | + <CardMessageComponent key={index}>{line}</CardMessageComponent> |
156 | 157 | </> |
157 | 158 | ); |
158 | 159 | })} |
@@ -201,27 +202,30 @@ export const CardWithHeadlineComponent: React.FC< |
201 | 202 | return ( |
202 | 203 | <div role="region" aria-labelledby={regionId}> |
203 | 204 | {sectionHeadline && ( |
204 | | - <> |
205 | | - <h3 |
206 | | - id={regionId} |
207 | | - className={clsx( |
208 | | - styles.cardHeadline__title, |
209 | | - getLocalizedSecondaryFont(languageCode) |
210 | | - )} |
211 | | - > |
212 | | - {sectionHeadline.title} |
213 | | - {sectionHeadline.titleTag && ( |
214 | | - <span className={styles.cardHeadline__titleTag}> |
215 | | - {sectionHeadline.titleTag} |
216 | | - </span> |
| 205 | + <div className={styles.title__container}> |
| 206 | + <div> |
| 207 | + <h3 |
| 208 | + id={regionId} |
| 209 | + className={clsx( |
| 210 | + styles.cardHeadline__title, |
| 211 | + getLocalizedSecondaryFont(languageCode) |
| 212 | + )} |
| 213 | + > |
| 214 | + {sectionHeadline.title} |
| 215 | + {sectionHeadline.titleTag && ( |
| 216 | + <span className={styles.cardHeadline__titleTag}> |
| 217 | + {sectionHeadline.titleTag} |
| 218 | + </span> |
| 219 | + )} |
| 220 | + </h3> |
| 221 | + {sectionHeadline.description && ( |
| 222 | + <p className={styles.cardHeadline__description}> |
| 223 | + {sectionHeadline.description} |
| 224 | + </p> |
217 | 225 | )} |
218 | | - </h3> |
219 | | - {sectionHeadline.description && ( |
220 | | - <p className={styles.cardHeadline__description}> |
221 | | - {sectionHeadline.description} |
222 | | - </p> |
223 | | - )} |
224 | | - </> |
| 226 | + </div> |
| 227 | + <EncodingFormatToggleSwitchComponent languageCode={languageCode} /> |
| 228 | + </div> |
225 | 229 | )} |
226 | 230 | <CardComponent languageCode={languageCode} {...props} /> |
227 | 231 | </div> |
|
0 commit comments