forked from p15670423/monkey
ui: move getDefaultPaneParams() to InfoPane.js
This commit is contained in:
parent
917d6f574b
commit
145a41ffcf
|
@ -4,10 +4,10 @@ import {Button, Card, Form} from 'react-bootstrap';
|
||||||
import {cloneDeep} from 'lodash';
|
import {cloneDeep} from 'lodash';
|
||||||
|
|
||||||
import {getComponentHeight} from './utils/HeightCalculator';
|
import {getComponentHeight} from './utils/HeightCalculator';
|
||||||
import InfoPane from './InfoPane';
|
import {getDefaultPaneParams, InfoPane} from './InfoPane';
|
||||||
import {MasterCheckbox, MasterCheckboxState} from './MasterCheckbox';
|
import {MasterCheckbox, MasterCheckboxState} from './MasterCheckbox';
|
||||||
import ChildCheckbox from './ChildCheckbox';
|
import ChildCheckbox from './ChildCheckbox';
|
||||||
import {getFullDefinitionByKey, getDefaultPaneParams} from './JsonSchemaHelpers';
|
import {getFullDefinitionByKey} from './JsonSchemaHelpers';
|
||||||
|
|
||||||
function AdvancedMultiSelectHeader(props) {
|
function AdvancedMultiSelectHeader(props) {
|
||||||
const {
|
const {
|
||||||
|
|
|
@ -3,6 +3,12 @@ import React from 'react';
|
||||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||||
import {faQuestionCircle} from '@fortawesome/free-solid-svg-icons';
|
import {faQuestionCircle} from '@fortawesome/free-solid-svg-icons';
|
||||||
|
|
||||||
|
import {getObjectFromRegistryByRef} from './JsonSchemaHelpers';
|
||||||
|
|
||||||
|
function getDefaultPaneParams(refString, registry) {
|
||||||
|
let configSection = getObjectFromRegistryByRef(refString, registry);
|
||||||
|
return ({title: configSection.title, content: configSection.description});
|
||||||
|
}
|
||||||
|
|
||||||
function InfoPane(props) {
|
function InfoPane(props) {
|
||||||
return (
|
return (
|
||||||
|
@ -49,4 +55,4 @@ function getBody(props) {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default InfoPane
|
export {getDefaultPaneParams, InfoPane}
|
||||||
|
|
|
@ -16,9 +16,4 @@ function getObjectFromRegistryByRef(refString, registry) {
|
||||||
return resolveObjectPath(refArray, registry);
|
return resolveObjectPath(refArray, registry);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDefaultPaneParams(refString, registry) {
|
export {getFullDefinitionByKey, getObjectFromRegistryByRef};
|
||||||
let configSection = getObjectFromRegistryByRef(refString, registry);
|
|
||||||
return ({title: configSection.title, content: configSection.description});
|
|
||||||
}
|
|
||||||
|
|
||||||
export {getFullDefinitionByKey, getDefaultPaneParams};
|
|
||||||
|
|
Loading…
Reference in New Issue