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:
@@ -1,28 +1,28 @@
|
||||
'use client'
|
||||
"use client"
|
||||
|
||||
import { cx } from 'class-variance-authority'
|
||||
import { AnimatePresence, motion } from 'motion/react'
|
||||
import { type PropsWithChildren, useEffect, useState } from 'react'
|
||||
import { cx } from "class-variance-authority"
|
||||
import { AnimatePresence, motion } from "motion/react"
|
||||
import { type PropsWithChildren, useEffect, useState } from "react"
|
||||
import {
|
||||
Modal as AriaModal,
|
||||
Dialog,
|
||||
DialogTrigger,
|
||||
ModalOverlay,
|
||||
} from 'react-aria-components'
|
||||
import { useIntl } from 'react-intl'
|
||||
} from "react-aria-components"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import {
|
||||
type AnimationState,
|
||||
AnimationStateEnum,
|
||||
type InnerModalProps,
|
||||
type ModalProps,
|
||||
} from './modal'
|
||||
import { fade, slideInOut } from './motionVariants'
|
||||
import { modalContentVariants } from './variants'
|
||||
} from "./modal"
|
||||
import { fade, slideInOut } from "./motionVariants"
|
||||
import { modalContentVariants } from "./variants"
|
||||
|
||||
import { IconButton } from '../IconButton'
|
||||
import { Typography } from '../Typography'
|
||||
import styles from './modal.module.css'
|
||||
import { IconButton } from "../IconButton"
|
||||
import { Typography } from "../Typography"
|
||||
import styles from "./modal.module.css"
|
||||
|
||||
const MotionOverlay = motion.create(ModalOverlay)
|
||||
const MotionModal = motion.create(AriaModal)
|
||||
@@ -89,8 +89,8 @@ function InnerModal({
|
||||
<Dialog
|
||||
className={styles.dialog}
|
||||
aria-label={intl.formatMessage({
|
||||
id: 'modal.dialog',
|
||||
defaultMessage: 'Dialog',
|
||||
id: "modal.dialog",
|
||||
defaultMessage: "Dialog",
|
||||
})}
|
||||
>
|
||||
{({ close }) => (
|
||||
@@ -119,8 +119,8 @@ function InnerModal({
|
||||
className={styles.close}
|
||||
type="button"
|
||||
aria-label={intl.formatMessage({
|
||||
id: 'common.close',
|
||||
defaultMessage: 'Close',
|
||||
id: "common.close",
|
||||
defaultMessage: "Close",
|
||||
})}
|
||||
variant="Muted"
|
||||
emphasis
|
||||
@@ -149,15 +149,15 @@ export default function Modal({
|
||||
children,
|
||||
withActions = false,
|
||||
hideHeader = false,
|
||||
className = '',
|
||||
contentClassName = '',
|
||||
className = "",
|
||||
contentClassName = "",
|
||||
}: PropsWithChildren<ModalProps>) {
|
||||
const [animation, setAnimation] = useState<AnimationState>(
|
||||
AnimationStateEnum.visible
|
||||
)
|
||||
|
||||
useEffect(() => {
|
||||
if (typeof isOpen === 'boolean') {
|
||||
if (typeof isOpen === "boolean") {
|
||||
setAnimation(
|
||||
isOpen ? AnimationStateEnum.visible : AnimationStateEnum.hidden
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user