Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 7aa6893d

Přidáno uživatelem Václav Honzík před asi 2 roky(ů)

button openable dialog now closes correctly

re #9741

Zobrazit rozdíly:

frontend/src/features/Reusables/ButtonOpenableDialog.tsx
10 10
    buttonVariant: 'text' | 'outlined' | 'contained' // the variant of the button that opens the dialog
11 11
    children: ReactNode // the content of the dialog
12 12
    maxWidth?: 'xs' | 'sm' | 'md' | 'lg' // the max width of the dialog
13
    open: boolean,
14
    setOpen: (open: boolean) => void
13 15
}
14 16

  
15 17

  
......
22 24
    buttonVariant,
23 25
    children,
24 26
    maxWidth,
27
    open,
28
    setOpen
25 29
}) => {
26
    const [open, setOpen] = useState(false)
27 30

  
28 31
    // Change maxWidth to large if its undefined
29 32
    maxWidth = maxWidth ?? 'lg'

Také k dispozici: Unified diff