@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.
46 lines (37 loc) • 1.24 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";
import type { ThemeProps } from "../defaultTheme";
export type As = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
type Type = "display" | "displaySubtitle" | "title1" | "title2" | "title3" | "title4" | "title5";
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,
+id?: 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;