@gravity-ui/uikit
Version:
Gravity UI base styling and components
53 lines (52 loc) • 1.49 kB
TypeScript
import type * as React from 'react';
import type { QAProps } from "../../types.js";
import type { MediaPartial, MediaType, Space } from "../types.js";
import "./Container.css";
export interface ContainerProps extends QAProps {
style?: React.CSSProperties;
/**
* Use function to define different classes in different media queries
*/
className?: string;
children?: React.ReactNode;
/**
* Width of container will never be larger then specified media type width
*/
maxWidth?: MediaType;
/**
* Right and left paddings between content
*
* Take default values during `LayoutContext`
*/
gutters?: Space | false;
/**
* Space between child `Row` components
*
* By default takes props via `LayoutContext`
*/
spaceRow?: Space | MediaPartial<Space>;
as?: keyof JSX.IntrinsicElements;
}
/**
* Center you content in horizontal direction.
*
* > In most cases must be one on the page.
*
* ```tsx
* import {Container, Row, Col} from '@gravity-ui/uikit';
*
* <Container masWidth="m">
* <Row>
* <Col>
* Col 1
* </Col>
* <Col>
* Col 2
* </Col>
* </Row>
* </Container>
* ```
* ---
* Storybook - https://preview.gravity-ui.com/uikit/?path=/docs/layout--playground#container
*/
export declare const Container: ({ children, style: propsStyle, as: Tag, className, maxWidth, gutters, spaceRow, qa, }: ContainerProps) => import("react/jsx-runtime").JSX.Element;