Skip to content

Commit

Permalink
feat(preview): add ts type definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
grabkowski committed May 11, 2021
1 parent c769de8 commit b653c65
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/components/preview/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "./preview";
11 changes: 7 additions & 4 deletions src/components/preview/preview.d.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import * as React from "react";
import { MarginSpacingProps } from "../../utils/helpers/options-helper";
import { MarginProps } from "styled-system";

export interface PreviewProps extends MarginSpacingProps {
children?: React.ReactNode;
export interface PreviewProps extends MarginProps {
/** A custom height to be applied to the component. */
height?: string;
/** The number of lines to render. */
lines?: number;
/* Provides more control over when in a loading state. */
loading?: boolean;
/** A custom width */
width?: string;
}

declare const Preview: React.FunctionComponent<PreviewProps>;
declare function Preview(props: React.PropsWithChildren<PreviewProps>): JSX.Element;

export default Preview;

0 comments on commit b653c65

Please sign in to comment.