trying to port web app starter from PHP
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php return [
|
||||
'render' => function($prop) {
|
||||
$id = trim((string)($prop['id'] ?? ''));
|
||||
$class = trim((string)($prop['class'] ?? ''));
|
||||
$attrs = trim((string)($prop['attrs'] ?? ''));
|
||||
$header = (string)($prop['header_html'] ?? '');
|
||||
$body = (string)($prop['body_html'] ?? '');
|
||||
ob_start();
|
||||
?>
|
||||
<section<?= $id !== '' ? ' id="' . asafe($id) . '"' : '' ?> class="ws-panel<?= $class !== '' ? ' ' . asafe($class) : '' ?>"<?= $attrs !== '' ? ' ' . $attrs : '' ?>>
|
||||
<?= $header ?>
|
||||
<?= $body ?>
|
||||
</section>
|
||||
<?php
|
||||
return ob_get_clean();
|
||||
},
|
||||
|
||||
'about' => 'Flexible workspace panel container with separate header and body slots',
|
||||
];
|
||||
Reference in New Issue
Block a user