@metamask/snaps-sdk
Version:
A library containing the core functionality for building MetaMask Snaps
40 lines • 1.69 kB
text/typescript
import type { GenericSnapElement, SnapsChildren } from "../component.cjs";
/**
* The props of the {@link Box} component.
*
* @property children - The children of the box.
* @property direction - The direction to stack the components within the box. Defaults to `vertical`.
* @property alignment - The alignment mode to use within the box. Defaults to `start`.
* @property crossAlignment - The cross alignment mode to use within the box.
* @property center - Whether to center the children within the box. Defaults to `false`.
*/
export type BoxProps = {
children: SnapsChildren<GenericSnapElement>;
direction?: 'vertical' | 'horizontal' | undefined;
alignment?: 'start' | 'center' | 'end' | 'space-between' | 'space-around' | undefined;
crossAlignment?: 'start' | 'center' | 'end';
center?: boolean | undefined;
};
/**
* A box component, which is used to group multiple components together.
*
* @param props - The props of the component.
* @param props.children - The children of the box.
* @param props.direction - The direction to stack the components within the box. Defaults to `vertical`.
* @param props.alignment - The alignment mode to use within the box. Defaults to `start`.
* @param props.crossAlignment - The cross alignment mode to use within the box.
* @param props.center - Whether to center the children within the box. Defaults to `false`.
* @returns A box element.
* @example
* <Box>
* <Text>Hello world!</Text>
* </Box>
*/
export declare const Box: import("../component.cjs").SnapComponent<BoxProps, "Box">;
/**
* A box element.
*
* @see Box
*/
export type BoxElement = ReturnType<typeof Box>;
//# sourceMappingURL=Box.d.cts.map