UNPKG

jobiqo-cl

Version:

[![CircleCI](https://circleci.com/gh/jobiqo/jobiqo-cl.svg?style=svg&circle-token=5a24efa5b8bbc4879276123e77d0d3f35ca7144c)](https://circleci.com/gh/jobiqo/jobiqo-cl)

49 lines (48 loc) 1.84 kB
/** * @file index.tsx * * @fileoverview Generates a box element. A div with some box styling properties * that come from the theme. */ /// <reference types="styled-components" /> import * as React from 'react'; import { ColorProps, ShadowProps, SpaceProps } from 'styled-system'; declare type BaseBoxProps = ColorProps & SpaceProps & ShadowProps; export interface BoxProps extends BaseBoxProps { /** * The content that goes inside the box component. */ children: React.ReactNode; /** * The title to be displaye in the top of the box. * * @default "" */ label?: string; /** * If the box should have a clean padding (no padding). * * @default false */ paddingClean?: boolean; /** * If the box should have a clean margin (no margin). * * @default false */ marginClean?: boolean; /** * The theme props is passed automatically to the component via styled components. * * @default "null" */ theme?: any; } /** * This component renders a box with some content inside. It has specific styling passed vai the theme object. It can be used in a * variety of situations but always should be used agains the background so that it contrasts with the background color. */ export declare const Box: React.ForwardRefExoticComponent<Pick<BoxProps, "label" | "p" | "color" | "children" | "bg" | "backgroundColor" | "opacity" | "m" | "margin" | "mt" | "marginTop" | "mr" | "marginRight" | "mb" | "marginBottom" | "ml" | "marginLeft" | "mx" | "marginX" | "my" | "marginY" | "padding" | "pt" | "paddingTop" | "pr" | "paddingRight" | "pb" | "paddingBottom" | "pl" | "paddingLeft" | "px" | "paddingX" | "py" | "paddingY" | "marginClean" | "paddingClean" | "boxShadow" | "textShadow"> & { theme?: any; }>; export default Box;