Skip to content
This repository has been archived by the owner on Aug 5, 2019. It is now read-only.

Typescript support #64

Closed
jtheisen opened this issue Aug 12, 2017 · 4 comments
Closed

Typescript support #64

jtheisen opened this issue Aug 12, 2017 · 4 comments

Comments

@jtheisen
Copy link

jtheisen commented Aug 12, 2017

Just want to have confirmed that there is indeed no type definition file, correct?

The beginning of a definition file:

declare module 'reflexbox' {

    import * as React from 'react'
    
    export interface BoxProps {
        w?: number | string,
        h?: number | string,
        
        flex?: boolean,
        wrap?: boolean,
        column?: boolean,
        auto?: boolean,
        order?: number,
        align?: "flex-start" | "flex-end" | "center" | "stretch" | "baseline",
        justify?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly",

        m?: number | string,
        mx?: number | string,
        my?: number | string,
        mt?: number | string,
        mb?: number | string,
        ml?: number | string,
        mr?: number | string,

        p?: number | string,
        px?: number | string,
        py?: number | string,
        pt?: number | string,
        pb?: number | string,
        pl?: number | string,
        pr?: number | string,
    }
    
    export class Flex extends React.Component<BoxProps> { } 
    export class Box extends React.Component<BoxProps> { } 
}
@netgusto
Copy link

netgusto commented Jan 1, 2018

Any news ?

@abenhamdine
Copy link

@jtheisen perhaps you could submit a PR, even if not all props are covered ?

@jtheisen
Copy link
Author

@abenhamdine I never got a reaction from the maintainer of this project, so I doubt it would do any good.

@abenhamdine
Copy link

abenhamdine commented Mar 20, 2018

@abenhamdine I never got a reaction from the maintainer of this project, so I doubt it would do any good.

then a PR to https://github.com/DefinitelyTyped/DefinitelyTyped would be nice 😃

@jxnblk jxnblk closed this as completed Aug 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants