Merged in fix/3697-prettier-configs (pull request #3396)

fix(SW-3691): Setup one prettier config for whole repo

* Setup prettierrc in root and remove other configs


Approved-by: Joakim Jäderberg
Approved-by: Linus Flood
This commit is contained in:
Rasmus Langvad
2026-01-07 12:45:50 +00:00
parent 932413412b
commit d0546926a9
500 changed files with 18367 additions and 18419 deletions

View File

@@ -1,5 +1,5 @@
'use client'
import { ReactElement, useState } from 'react'
"use client"
import { ReactElement, useState } from "react"
import {
Button,
type Key,
@@ -8,17 +8,17 @@ import {
Popover,
Select as ReactAriaSelect,
SelectValue,
} from 'react-aria-components'
} from "react-aria-components"
import SelectChevron from './SelectChevron'
import SelectChevron from "./SelectChevron"
import styles from './select.module.css'
import { InputLabel } from '../InputLabel'
import { Typography } from '../Typography'
import styles from "./select.module.css"
import { InputLabel } from "../InputLabel"
import { Typography } from "../Typography"
interface SelectProps extends Omit<
React.SelectHTMLAttributes<HTMLSelectElement>,
'onSelect'
"onSelect"
> {
defaultSelectedKey?: Key
items: { label: string; value: Key }[]
@@ -37,14 +37,14 @@ interface SelectProps extends Omit<
type SelectPortalContainer = HTMLDivElement | undefined
type SelectPortalContainerArgs = HTMLDivElement | null
const DELIMITER = ':'
const DELIMITER = ":"
/**
* @deprecated Do not use.
*/
export default function Select({
className = '',
'aria-label': ariaLabel,
className = "",
"aria-label": ariaLabel,
defaultSelectedKey,
items,
label,
@@ -78,16 +78,16 @@ export default function Select({
let chevronProps = {}
if (discreet) {
chevronProps = { color: 'baseButtonTextOnFillNormal' }
chevronProps = { color: "baseButtonTextOnFillNormal" }
} else if (disabled) {
chevronProps = { color: 'disabled' }
chevronProps = { color: "disabled" }
}
return (
<div className={`${styles.container} ${className}`} ref={setRef}>
<ReactAriaSelect
aria-label={ariaLabel}
className={`${styles.select} ${discreet ? styles.discreet : ''} select-container`}
className={`${styles.select} ${discreet ? styles.discreet : ""} select-container`}
defaultSelectedKey={defaultSelectedKey}
name={name}
onSelectionChange={handleOnSelect}
@@ -105,7 +105,7 @@ export default function Select({
<>
<InputLabel
required={required}
size={discreet ? 'discreet' : 'regular'}
size={discreet ? "discreet" : "regular"}
>
{label}
{discreet && DELIMITER}
@@ -113,7 +113,7 @@ export default function Select({
{selectedText && (
<Typography
variant="Body/Paragraph/mdRegular"
className={optionsIcon ? styles.iconLabel : ''}
className={optionsIcon ? styles.iconLabel : ""}
>
<p>
{optionsIcon ? optionsIcon : null}
@@ -165,9 +165,9 @@ export default function Select({
function useSetOverflowVisibleOnRA(isNestedInModal?: boolean) {
function setOverflowVisible(isOpen: boolean) {
if (isOpen) {
document.body.style.overflow = 'visible'
document.body.style.overflow = "visible"
} else if (!isNestedInModal) {
document.body.style.overflow = ''
document.body.style.overflow = ""
}
}