@eccenca/gui-elements
Version:
GUI elements based on other libraries, usable in React application, written in Typescript.
47 lines (46 loc) • 1.67 kB
TypeScript
import React from "react";
type WhiteSpaceSizes = "tiny" | "small" | "regular" | "large" | "xlarge";
export interface WhiteSpaceContainerProps extends React.HTMLAttributes<HTMLDivElement> {
/**
* Insert line breaks within an otherwise unbreakable string to prevent text from overflowing the container.
*/
linebreakForced?: boolean;
/**
* Size of top margin around the container.
*/
marginTop?: WhiteSpaceSizes;
/**
* Size of right margin around the container.
*/
marginRight?: WhiteSpaceSizes;
/**
* Size of bottom margin around the container.
*/
marginBottom?: WhiteSpaceSizes;
/**
* Size of left margin around the container.
*/
marginLeft?: WhiteSpaceSizes;
/**
* Size of top padding inside the container.
*/
paddingTop?: WhiteSpaceSizes;
/**
* Size of right padding inside the container.
*/
paddingRight?: WhiteSpaceSizes;
/**
* Size of bottom padding inside the container.
*/
paddingBottom?: WhiteSpaceSizes;
/**
* Size of left padding inside the container.
*/
paddingLeft?: WhiteSpaceSizes;
}
/**
* Simple container to add whitespace inside and around of it without adding style attributes directly.
* This way the added whitespace keeps visually connected to the other whitespaces used in the application.
*/
export declare const WhiteSpaceContainer: ({ className, children, marginTop, marginRight, marginBottom, marginLeft, paddingTop, paddingRight, paddingBottom, paddingLeft, linebreakForced, ...otherDivProps }: WhiteSpaceContainerProps) => React.JSX.Element;
export default WhiteSpaceContainer;