[shared-ux] remove circular dependency in solution-nav (#147201)

While working on another project I found a circular dependency between
the `@kbn/shared-ux-page-solution-nav` and
`@kbn/shared-ux-page-kibana-template-types` packages. My upcoming PR
will prevent this from happening in the future, but for now this is just
a small change to fix the issue.
This commit is contained in:
Spencer 2022-12-07 16:48:19 -08:00 committed by GitHub
parent e674e11381
commit 8b89a5bd5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,8 +8,12 @@
import React, { ComponentType, ReactNode, useState } from 'react';
import classNames from 'classnames';
import { KibanaPageTemplateProps } from '@kbn/shared-ux-page-kibana-template-types';
import { useIsWithinBreakpoints, useEuiTheme, useIsWithinMinBreakpoint } from '@elastic/eui';
import {
useIsWithinBreakpoints,
useEuiTheme,
useIsWithinMinBreakpoint,
EuiPageSidebarProps,
} from '@elastic/eui';
import { SolutionNav, SolutionNavProps } from './solution_nav';
import { WithSolutionNavStyles } from './with_solution_nav.styles';
@ -18,9 +22,11 @@ function getDisplayName(Component: ComponentType<any>) {
return Component.displayName || Component.name || 'UnnamedComponent';
}
type TemplateProps = Pick<KibanaPageTemplateProps, 'pageSideBar' | 'pageSideBarProps'> & {
export interface TemplateProps {
children?: ReactNode;
};
pageSideBar?: ReactNode;
pageSideBarProps?: EuiPageSidebarProps;
}
type Props<P> = P &
TemplateProps & {