ui: move getDefaultPaneParams() to InfoPane.js

This commit is contained in:
Mike Salvatore 2021-01-26 15:46:57 -05:00
parent 917d6f574b
commit 145a41ffcf
3 changed files with 10 additions and 9 deletions

View File

@ -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 {

View File

@ -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}

View File

@ -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};