-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
42 lines (28 loc) · 942 Bytes
/
index.php
File metadata and controls
42 lines (28 loc) · 942 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
42
<?php
use PhpSPA\App;
use PhpSPA\Component;
require 'vendor/autoload.php';
$Layout = fn() => <<<HTML
<div id="app"></div>
HTML;
$Component = new Component(fn() => <<<HTML
<div style="padding: 2rem;">
<h1>Welcome to VelarUI!</h1>
<p>This is a component from your new library:</p>
<br>
<VelarUI.Button variant="primary">Primary Button</VelarUI.Button>
<VelarUI.Button variant="secondary">Secondary</VelarUI.Button>
<VelarUI.Button variant="danger" type="submit">Danger</VelarUI.Button>
<br><br>
<VelarUI.Button variant="outline-primary">Outline</VelarUI.Button>
<VelarUI.Button variant="link">Link Button</VelarUI.Button>
<br><br>
<VelarUI.Button variant="primary" to="/about">
Go to About (SPA Nav)
</VelarUI.Button>
</div>
HTML);
(new App($Layout))
->attach($Component)
->styleSheet([VelarUI\Assets::class, 'css'])
->run();