diff --git a/src/content/components/uikit/Overlay/OverlayComponent.tsx b/src/content/components/uikit/Overlay/OverlayComponent.tsx new file mode 100644 index 00000000000..551bcd148c8 --- /dev/null +++ b/src/content/components/uikit/Overlay/OverlayComponent.tsx @@ -0,0 +1,32 @@ +import {Box, Flex, Loader, Overlay} from '@gravity-ui/uikit'; +import React from 'react'; + +type OverlayComponentProps = { + visible?: boolean; + background?: 'base' | 'float'; +}; + +export const OverlayComponent = ({visible, background}: OverlayComponentProps) => { + const anchorRef = React.useRef(null); + + return ( + + + Some text + + + + + + ); +}; diff --git a/src/content/components/uikit/Overlay/index.ts b/src/content/components/uikit/Overlay/index.ts new file mode 100644 index 00000000000..b9efb6809ae --- /dev/null +++ b/src/content/components/uikit/Overlay/index.ts @@ -0,0 +1,29 @@ +import dynamic from 'next/dynamic'; + +import {Repos} from '../../../../types/common'; +import {getGithubUrl, getReadmeUrl, mappingOptions} from '../../utils'; + +const getterOptions = {repoName: Repos.Uikit, componentName: 'Overlay'}; + +export const overlayConfig = { + id: 'overlay', + title: 'Overlay', + githubUrl: getGithubUrl(getterOptions), + content: { + readmeUrl: getReadmeUrl(getterOptions), + }, + sandbox: { + component: dynamic(() => import('./OverlayComponent').then((mod) => mod.OverlayComponent)), + props: { + visible: { + type: 'switch', + defaultValue: true, + }, + background: { + type: 'radioButton', + values: mappingOptions(['base', 'float']), + defaultValue: 'base', + }, + }, + }, +}; diff --git a/src/content/components/uikit/index.ts b/src/content/components/uikit/index.ts index 29e303f6863..4c85aa181ae 100644 --- a/src/content/components/uikit/index.ts +++ b/src/content/components/uikit/index.ts @@ -18,6 +18,7 @@ import {listConfig} from './List'; import {loaderConfig} from './Loader'; import {menuConfig} from './Menu'; import {modalConfig} from './Modal'; +import {overlayConfig} from './Overlay'; import {paginationConfig} from './Pagination'; import {paletteConfig} from './Palette'; import {pinInputConfig} from './PinInput'; @@ -61,6 +62,7 @@ const uikitComponents: Component[] = [ loaderConfig, menuConfig, modalConfig, + overlayConfig, paginationConfig, paletteConfig, pinInputConfig,