@kiwicom/orbit-components
Version:
Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com’s products.
54 lines (44 loc) • 1.28 kB
Flow
// @flow
/*
DOCUMENTATION: https://orbit.kiwi/components/heading/
*/
import * as React from "react";
import type { StyledComponent } from "styled-components";
import type { Globals } from "../common/common.js.flow";
import type { spaceAfter } from "../common/getSpacingToken/index.js.flow";
import type { ThemeProps } from "../defaultTheme.js.flow";
export type As = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
type Type =
| "display"
| "displaySubtitle"
| "title1"
| "title2"
| "title3"
| "title4"
| "title5"
| "title6";
type Align = "start" | "center" | "end" | "justify";
export type MediaQuery = {|
+type?: Type,
+align?: Align,
...spaceAfter,
|};
export type Props = {|
...Globals,
...spaceAfter,
+as?: As,
+align?: Align,
+type?: Type,
+children: React.Node,
+inverted?: boolean,
+dataA11ySection?: string,
+mediumMobile?: MediaQuery,
+largeMobile?: MediaQuery,
+tablet?: MediaQuery,
+desktop?: MediaQuery,
+largeDesktop?: MediaQuery,
|};
export type GetHeadingToken = (name: string, type: Type) => ({| ...ThemeProps |}) => string;
declare export default React.ComponentType<Props>;
declare export var StyledHeading: StyledComponent<any, any, HTMLElement>;
declare export var getHeadingToken: GetHeadingToken;