Merged in fix/SW-1631-rate-terms-modal (pull request #1699)

fix(SW-1631): add rate terms modal

* fix(SW-1631): add rate terms modal


Approved-by: Simon.Emanuelsson
This commit is contained in:
Arvid Norlin
2025-04-02 09:36:53 +00:00
parent be04600863
commit 961e8aea91
26 changed files with 690 additions and 59 deletions

View File

@@ -0,0 +1,29 @@
import type { Dispatch, SetStateAction } from 'react'
export enum AnimationStateEnum {
unmounted = 'unmounted',
hidden = 'hidden',
visible = 'visible',
}
export type AnimationState = keyof typeof AnimationStateEnum
export type ModalProps = {
onAnimationComplete?: VoidFunction
title?: string
subtitle?: string
withActions?: boolean
hideHeader?: boolean
} & (
| { 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>>
}