Merged in chore/replace-deprecated-body (pull request #3300)

Replace deprecated <Body> with <Typography>

* chore: replace deprecated body component

* refactor: replace Body component with Typography across various components

* merge


Approved-by: Bianca Widstam
Approved-by: Matilda Landström
This commit is contained in:
Joakim Jäderberg
2025-12-09 12:45:34 +00:00
parent f40035baa9
commit 7eb74ea239
69 changed files with 755 additions and 899 deletions

View File

@@ -13,8 +13,8 @@ import {
import SelectChevron from './SelectChevron'
import styles from './select.module.css'
import Body from '../Body'
import { InputLabel } from '../InputLabel'
import { Typography } from '../Typography'
interface SelectProps extends Omit<
React.SelectHTMLAttributes<HTMLSelectElement>,
@@ -95,7 +95,7 @@ export default function Select({
onOpenChange={setOverflowVisible}
isDisabled={disabled}
>
<Body asChild fontOnly>
<Typography variant="Body/Paragraph/mdRegular">
<Button
className={`${styles.input} select-button`}
data-testid={name}
@@ -111,18 +111,23 @@ export default function Select({
{discreet && DELIMITER}
</InputLabel>
{selectedText && (
<Body className={optionsIcon ? styles.iconLabel : ''}>
{optionsIcon ? optionsIcon : null}
{selectedText}
</Body>
<Typography
variant="Body/Paragraph/mdRegular"
className={optionsIcon ? styles.iconLabel : ''}
>
<p>
{optionsIcon ? optionsIcon : null}
{selectedText}
</p>
</Typography>
)}
</>
)}
</SelectValue>
<SelectChevron {...chevronProps} />
</Button>
</Body>
<Body asChild fontOnly>
</Typography>
<Typography variant="Body/Paragraph/mdRegular">
<Popover
className={styles.popover}
placement="bottom"
@@ -151,7 +156,7 @@ export default function Select({
))}
</ListBox>
</Popover>
</Body>
</Typography>
</ReactAriaSelect>
</div>
)