Migrate techdocs-cli-embedded-app to NFS
Signed-off-by: Gabriel Dugny <gabriel.dugny@believe.com>
This commit is contained in:
@@ -265,9 +265,13 @@ const _default: OverridableFrontendPlugin<
|
||||
}>;
|
||||
'page:techdocs/reader': OverridableExtensionDefinition<{
|
||||
config: {
|
||||
withSearch: boolean;
|
||||
withHeader: boolean;
|
||||
path: string | undefined;
|
||||
};
|
||||
configInput: {
|
||||
withSearch?: boolean | undefined;
|
||||
withHeader?: boolean | undefined;
|
||||
path?: string | undefined;
|
||||
};
|
||||
output:
|
||||
|
||||
@@ -152,7 +152,13 @@ const techDocsReaderPage = PageBlueprint.makeWithOverrides({
|
||||
inputs: {
|
||||
addons: createExtensionInput([AddonBlueprint.dataRefs.addon]),
|
||||
},
|
||||
factory(originalFactory, { inputs }) {
|
||||
config: {
|
||||
schema: {
|
||||
withSearch: z => z.boolean().default(true),
|
||||
withHeader: z => z.boolean().default(true),
|
||||
},
|
||||
},
|
||||
factory(originalFactory, { inputs, config }) {
|
||||
const addons = inputs.addons.map(output => {
|
||||
const options = output.get(AddonBlueprint.dataRefs.addon);
|
||||
const Addon = options.component;
|
||||
@@ -166,7 +172,10 @@ const techDocsReaderPage = PageBlueprint.makeWithOverrides({
|
||||
loader: async () =>
|
||||
await import('../Router').then(({ TechDocsReaderRouter }) => (
|
||||
<TechDocsReaderRouter>
|
||||
<TechDocsReaderLayout />
|
||||
<TechDocsReaderLayout
|
||||
withSearch={config.withSearch}
|
||||
withHeader={config.withHeader}
|
||||
/>
|
||||
<TechDocsAddons>{addons}</TechDocsAddons>
|
||||
</TechDocsReaderRouter>
|
||||
)),
|
||||
|
||||
Reference in New Issue
Block a user