@jupyter-notebook/web-components
Version:
A component library for building extensions in Jupyter frontends.
14 lines (13 loc) • 568 B
JavaScript
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
import { DesignSystem } from '@microsoft/fast-foundation';
/**
* Provides a design system for the specified element either by returning one that was
* already created for that element or creating one.
* @param element - The element to root the design system at. By default, this is the body.
* @returns A Jupyter Design System
* @public
*/
export function provideJupyterDesignSystem(element) {
return DesignSystem.getOrCreate(element).withPrefix('jp');
}