config-schema: dev setup with example schema
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -13,12 +13,27 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
|
||||
import { createDevApp } from '@backstage/dev-utils';
|
||||
import { configSchemaPlugin, ConfigSchemaPage } from '../src/plugin';
|
||||
import React from 'react';
|
||||
import Observable from 'zen-observable';
|
||||
import { configSchemaApiRef } from '../src/api';
|
||||
import { ConfigSchemaResult } from '../src/api/types';
|
||||
import { ConfigSchemaPage, configSchemaPlugin } from '../src/plugin';
|
||||
import exampleSchema from './example-schema.json';
|
||||
|
||||
createDevApp()
|
||||
.registerPlugin(configSchemaPlugin)
|
||||
.registerApi({
|
||||
api: configSchemaApiRef,
|
||||
deps: {},
|
||||
factory: () => ({
|
||||
schema$: () =>
|
||||
new Observable<ConfigSchemaResult>(sub =>
|
||||
sub.next({ schema: exampleSchema }),
|
||||
),
|
||||
}),
|
||||
})
|
||||
.addPage({
|
||||
element: <ConfigSchemaPage />,
|
||||
title: 'Root Page',
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"@material-ui/core": "^4.11.0",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@material-ui/lab": "4.0.0-alpha.45",
|
||||
"zen-observable": "^0.8.15",
|
||||
"react": "^16.13.1",
|
||||
"react-dom": "^16.13.1",
|
||||
"react-use": "^15.3.3"
|
||||
|
||||
Reference in New Issue
Block a user