@itwin/itwinui-react
Version:
A react component library for iTwinUI
49 lines (48 loc) • 1.42 kB
TypeScript
import * as React from 'react';
import type { PolymorphicForwardRefComponent } from '../../utils/index.js';
type SurfaceBodyOwnProps = {
/**
* Gives padding to the surface body
* @default false
*/
isPadded?: boolean;
};
type SurfaceProps = {
/**
* Sets the elevation of the surface
*/
elevation?: 0 | 1 | 2 | 3 | 4 | 5;
/**
* Sets the border of the surface.
*
* Can be a boolean to toggle the default border, or a string value to specify a custom border.
*
* @default true
*/
border?: boolean | string;
/**
* Content in the surface.
*/
children: React.ReactNode;
};
/**
* The Surface container allows content to appear elevated through the use of a drop shadow
* @example
* <Surface>Surface Content</Surface>
* <Surface elevation={2}>Surface Content</Surface>
* <Surface>
* <Surface.Header>Surface Header Content</Surface.Header>
* <Surface.Body isPadded={true}>Surface Body Content</Surface.Body>
* </Surface>
*/
export declare const Surface: PolymorphicForwardRefComponent<"div", SurfaceProps> & {
/**
* Surface header subcomponent
*/
Header: PolymorphicForwardRefComponent<"div", {}>;
/**
* Surface body subcomponent. Additional padding can be added to the body through the 'isPadded' prop
*/
Body: PolymorphicForwardRefComponent<"div", SurfaceBodyOwnProps>;
};
export {};