chore: Update to ESLint 9 * wip: apply codemod and upgrade swc plugin * Update eslint to 9 in scandic-web apply code mod to config fix existing lint issues * Remove uneccessary fixupConfigRules * Update eslint to 9 in design-system * Add lint turbo dependency * Move redis-api to eslint and prettier instead of biome * Simplify eslint configs * Clean up * Apply linting Approved-by: Linus Flood
31 lines
713 B
TypeScript
31 lines
713 B
TypeScript
import type { Dispatch, JSX, SetStateAction } from "react"
|
|
|
|
export enum AnimationStateEnum {
|
|
unmounted = "unmounted",
|
|
hidden = "hidden",
|
|
visible = "visible",
|
|
}
|
|
|
|
export type AnimationState = keyof typeof AnimationStateEnum
|
|
|
|
export type ModalProps = {
|
|
onAnimationComplete?: () => void
|
|
title?: string
|
|
subtitle?: string
|
|
withActions?: boolean
|
|
hideHeader?: boolean
|
|
className?: string
|
|
} & (
|
|
| { trigger: JSX.Element; isOpen?: never; onToggle?: never }
|
|
| {
|
|
trigger?: never
|
|
isOpen: boolean
|
|
onToggle: (open: boolean) => void
|
|
}
|
|
)
|
|
|
|
export type InnerModalProps = Omit<ModalProps, "trigger"> & {
|
|
animation: AnimationState
|
|
setAnimation: Dispatch<SetStateAction<AnimationState>>
|
|
}
|