lucid-ui
Version:
A UI component library from Xandr.
75 lines • 2.87 kB
TypeScript
import React from 'react';
import PropTypes from 'prop-types';
import { StandardProps } from '../../util/component-types';
export interface IResponsiveGridCellProps extends StandardProps {
}
/** Responsive Grid */
export interface IResponsiveGridProps extends IResponsiveGridWrapperProps {
/**
* Width of the grid. Note: this does not set the width of the grid, and should be
* provided by calculating the width of the parent element.
*/
width: number;
}
export declare class ResponsiveGrid extends React.Component<IResponsiveGridProps> {
static displayName: string;
static propTypes: {
/**
Width of the grid. Note: this does not set the width of the grid, and should be
provided by calculating the width of the parent element.
*/
width: PropTypes.Requireable<number>;
/**
Break points for the grid to switch column layouts. Break points should be provided
in ascending order. Currently only two break points are used. Example: [960, 1430]
*/
breakPoints: PropTypes.Requireable<(number | null | undefined)[]>;
/**
Appended to the component-specific class names set on the root elements.
*/
className: PropTypes.Requireable<string>;
};
getColumnLayout: (numberOfColumns: number) => JSX.Element;
shouldComponentUpdate(nextProps: IResponsiveGridProps): boolean;
render(): JSX.Element;
}
/** Responsive Grid Wrapper */
export interface IResponsiveGridWrapperProps extends StandardProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
/**
* Break points for the grid to switch column layouts. Break points should be provided
* in ascending order. Currently only two break points are used. Example: [960, 1430]
*/
breakPoints: number[];
}
declare const ResponsiveGridWrapper: {
(props: IResponsiveGridWrapperProps): JSX.Element;
Cell: {
(_props: IResponsiveGridCellProps): null;
displayName: string;
peek: {
description: string;
};
};
defaultProps: {
breakPoints: number[];
};
displayName: string;
propTypes: {
/**
Break points for the grid to switch column layouts. Break points should be provided
in ascending order. Currently only two break points are used. Example: [960, 1430]
*/
breakPoints: PropTypes.Requireable<(number | null | undefined)[]>;
/**
Appended to the component-specific class names set on the root elements.
*/
className: PropTypes.Requireable<string>;
};
peek: {
description: string;
categories: string[];
madeFrom: string[];
};
};
export default ResponsiveGridWrapper;
//# sourceMappingURL=ResponsiveGrid.d.ts.map