Skip to content

Commit 2bd9670

Browse files
committed
added _preloader
1 parent 1981ff9 commit 2bd9670

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

example.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,9 @@
5050

5151
$ui::render($ui::merge($ui::p("Something"), $ui::p("Here")));
5252
$ui::render($ui::_fragment([$ui::p("Something"), $ui::p("Here")]));
53-
$ui::render($ui::_preloader($ui::p("Loading...")));
53+
$ui::render(
54+
$ui::_preloader($ui::_fragment([
55+
$ui::img("./1.jpg"),
56+
$ui::h2("Loading...")
57+
]))
58+
);

src/UI.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1113,10 +1113,11 @@ public static function _preloader($children, array $props = []) {
11131113
display: flex !important;
11141114
justify-content: center !important;
11151115
align-items: center !important;
1116+
flex-direction: column;
11161117
background: white;
11171118
",
11181119
"#{$props['id']} > *" => "
1119-
width: 100px !important;
1120+
width: 100px;
11201121
",
11211122
"#{$props['id']}.hidden" => "
11221123
animation: fadeOut 1.5s !important;

0 commit comments

Comments
 (0)