Skip to content

Commit

Permalink
[Clint feedback] Export EuiComponentDefaults context/provider as to…
Browse files Browse the repository at this point in the history
…p-level EUI export
  • Loading branch information
cee-chen committed Aug 3, 2023
1 parent e64f745 commit 1067453
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ export const EuiComponentDefaultsContext =
/*
* Component
*/
export type EuiComponentDefaultsProviderProps = PropsWithChildren & {
componentDefaults?: EuiComponentDefaults;
};
export const EuiComponentDefaultsProvider: FunctionComponent<
PropsWithChildren & {
componentDefaults?: EuiComponentDefaults;
}
EuiComponentDefaultsProviderProps
> = ({ componentDefaults = emptyDefaults, children }) => {
return (
<EuiComponentDefaultsContext.Provider value={componentDefaults}>
Expand Down
6 changes: 6 additions & 0 deletions src/components/provider/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@

export type { EuiProviderProps } from './provider';
export { EuiProvider } from './provider';

export type { EuiComponentDefaultsProviderProps } from './component_defaults';
export {
EuiComponentDefaultsProvider,
EuiComponentDefaultsContext,
} from './component_defaults';

0 comments on commit 1067453

Please sign in to comment.