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.
30 lines
526 B
30 lines
526 B
<?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()
|
|
]
|
|
];
|
|
},
|
|
],
|
|
];
|
|
|