You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
526 B
31 lines
526 B
2 months ago
|
<?php
|
||
|
|
||
|
use Kirby\Panel\Lab\Docs;
|
||
|
|
||
|
return [
|
||
|
'lab.docs' => [
|
||
|
'pattern' => 'lab/docs/(:any)',
|
||
|
'load' => function (string $component) {
|
||
|
if (Docs::installed() === false) {
|
||
|
return [
|
||
|
'component' => 'k-text-drawer',
|
||
|
'props' => [
|
||
|
'text' => 'The UI docs are not installed.'
|
||
|
]
|
||
|
];
|
||
|
}
|
||
|
|
||
|
$docs = new Docs($component);
|
||
|
|
||
|
return [
|
||
|
'component' => 'k-lab-docs-drawer',
|
||
|
'props' => [
|
||
|
'icon' => 'book',
|
||
|
'title' => $component,
|
||
|
'docs' => $docs->toArray()
|
||
|
]
|
||
|
];
|
||
|
},
|
||
|
],
|
||
|
];
|