import { AlignItemsProperty, FlexWrapProperty, Globals, JustifyContentProperty, OverflowProperty, PositionProperty, TextAlignProperty } from "csstype"; import * as React from "react"; import { Opacities, Shadows, ZIndex } from "../../foundations/foundation-types"; import { type BaseProps } from "../Base"; type WidthProperty = Globals | "auto" | number | string | null; type HeightProperty = Globals | "auto" | number | string | null; type FlexBasisProperty = Globals | "auto" | number | string | null; type IsNever = [T] extends [never] ? true : false; interface SupportedCSSProps { display: never; flex: never; flexFlow: never; flexDirection: never; overflowX: never; overflowY: never; alignSelf: never; flexWrap?: FlexWrapProperty | FlexWrapProperty[]; alignItems?: AlignItemsProperty | AlignItemsProperty[]; justifyContent?: JustifyContentProperty | JustifyContentProperty[]; flexGrow?: number | number[]; flexShrink?: number | number[]; flexBasis?: FlexBasisProperty | FlexBasisProperty[]; position?: PositionProperty | PositionProperty[]; overflow?: OverflowProperty | OverflowProperty[]; opacity?: Opacities | Opacities[] | ""; color?: string | string[]; backgroundColor?: string | string[]; borderRadius?: number | number[]; width?: WidthProperty | WidthProperty[]; minWidth?: WidthProperty | WidthProperty[]; minHeight?: HeightProperty | HeightProperty[]; height?: HeightProperty | HeightProperty[]; maxWidth?: WidthProperty | WidthProperty[]; maxHeight?: HeightProperty | HeightProperty[]; zIndex?: ZIndex | ZIndex[] | number | ""; boxShadow?: Shadows | Shadows[] | ""; borderColor?: string | string[]; border?: number | number[]; borderTop?: number | number[]; borderRight?: number | number[]; borderBottom?: number | number[]; borderLeft?: number | number[]; transition?: string | string[]; textAlign?: TextAlignProperty | TextAlignProperty[]; } export type ViewProps = { [P in keyof SupportedCSSProps]?: IsNever extends true ? React.CSSProperties[P] | React.CSSProperties[P][] : SupportedCSSProps[P]; } & BaseProps & { tid?: string; mode?: "light" | "dark"; backgroundOpacity?: Opacities | ""; /** Supply a color with the secondColor prop. The available colors can be found in the Colors section. Only used in Icon Component. */ secondColor?: string; }; /** * The `View` component is the most fundamental component for building a user interface with Go1d. The `View` component uses flex box via props to define the layout. Read [A Guide to Flexbox](https://css-tricks.com/snippets/css/a-guide-to-flexbox/). * * All Go1d components except `Text` should be built using `View`. It uses styling props connected to our foundations. You can use it where you would usually use a `div`. */ declare class View extends React.Component { static displayName: string; render(): JSX.Element; } export default View;