-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Expand file tree
/
Copy pathModalComponent.php
More file actions
41 lines (30 loc) · 1007 Bytes
/
ModalComponent.php
File metadata and controls
41 lines (30 loc) · 1007 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
namespace Filament\Support\View\Components;
class ModalComponent
{
public static bool $hasCloseButton = true;
public static bool $isClosedByClickingAway = true;
public static bool $isClosedByEscaping = true;
public static bool $isModalClickThrough = false;
public static bool $isAutofocused = true;
public static function autofocus(bool $condition = true): void
{
static::$isAutofocused = $condition;
}
public static function closeButton(bool $condition = true): void
{
static::$hasCloseButton = $condition;
}
public static function closedByClickingAway(bool $condition = true): void
{
static::$isClosedByClickingAway = $condition;
}
public static function closedByEscaping(bool $condition = true): void
{
static::$isClosedByEscaping = $condition;
}
public static function modalClickThrough(bool $condition = true): void
{
static::$isModalClickThrough = $condition;
}
}