47 lines
1.5 KiB
PHP
47 lines
1.5 KiB
PHP
<?php
|
|
|
|
require_once __DIR__ . '/../vendor/autoload.php';
|
|
|
|
use PHPNative\Framework\Application;
|
|
use PHPNative\Ui\Widget\Container;
|
|
use PHPNative\Ui\Window;
|
|
|
|
// Create application
|
|
$app = new Application();
|
|
$window = new Window('Shadow Color & Opacity Test', 800, 600);
|
|
|
|
$mainContainer = new Container('flex flex-col gap-6 items-center justify-center bg-gray-100 p-8');
|
|
|
|
// Test 1: Default shadow (black)
|
|
$box1 = new Container('w-48 h-32 bg-white rounded-lg shadow-lg flex items-center justify-center');
|
|
|
|
// Test 2: Shadow with opacity modifier (50% opacity)
|
|
$box2 = new Container('w-48 h-32 bg-white rounded-lg shadow-lg/50 flex items-center justify-center');
|
|
|
|
// Test 3: Red shadow
|
|
$box3 = new Container('w-48 h-32 bg-white rounded-lg shadow-red-500 flex items-center justify-center');
|
|
|
|
// Test 4: Blue shadow with opacity
|
|
$box4 = new Container('w-48 h-32 bg-white rounded-lg shadow-blue-500/30 flex items-center justify-center');
|
|
|
|
// Test 5: Green shadow with large size
|
|
$box5 = new Container('w-48 h-32 bg-white rounded-lg shadow-xl shadow-green-500 flex items-center justify-center');
|
|
|
|
// Create row containers for better layout
|
|
$row1 = new Container('flex gap-6');
|
|
$row1->addComponent($box1);
|
|
$row1->addComponent($box2);
|
|
$row1->addComponent($box3);
|
|
|
|
$row2 = new Container('flex gap-6');
|
|
$row2->addComponent($box4);
|
|
$row2->addComponent($box5);
|
|
|
|
$mainContainer->addComponent($row1);
|
|
$mainContainer->addComponent($row2);
|
|
|
|
// Set window content and run
|
|
$window->setRoot($mainContainer);
|
|
$app->addWindow($window);
|
|
$app->run();
|