fix(LOY-196): replace employee number with dummy value

add support for className to modal
This commit is contained in:
Christian Andolf
2025-05-07 10:32:32 +02:00
parent 9b22459837
commit 8ca0aee25e
4 changed files with 18 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
"use client"
import { cx } from "class-variance-authority"
import { motion } from "framer-motion"
import { type PropsWithChildren, useEffect, useState } from "react"
import {
@@ -40,6 +41,7 @@ function InnerModal({
subtitle,
withActions,
hideHeader,
className,
}: PropsWithChildren<InnerModalProps>) {
const intl = useIntl()
@@ -67,7 +69,7 @@ function InnerModal({
<MotionOverlay
animate={animation}
className={styles.overlay}
initial={"hidden"}
initial="hidden"
isDismissable
isExiting={animation === AnimationStateEnum.hidden}
onAnimationComplete={modalStateHandler}
@@ -76,10 +78,10 @@ function InnerModal({
onOpenChange={onOpenChange}
>
<MotionModal
className={styles.modal}
className={cx(styles.modal, className)}
variants={slideInOut}
animate={animation}
initial={"hidden"}
initial="hidden"
>
<Dialog
className={styles.dialog}
@@ -135,6 +137,7 @@ export default function Modal({
children,
withActions = false,
hideHeader = false,
className = "",
}: PropsWithChildren<ModalProps>) {
const [animation, setAnimation] = useState<AnimationState>(
AnimationStateEnum.visible
@@ -163,6 +166,7 @@ export default function Modal({
subtitle={subtitle}
withActions={withActions}
hideHeader={hideHeader}
className={className}
>
{children}
</InnerModal>
@@ -185,6 +189,7 @@ export default function Modal({
title={title}
subtitle={subtitle}
withActions={withActions}
className={className}
>
{children}
</InnerModal>