mirror of
https://github.com/status-im/react-native-linear-gradient.git
synced 2025-03-02 16:20:29 +00:00
Added TypeScript Typings
Not sure if you are interested in supporting Typescript users, but I did this while using your library for myself and thought I would share. Thanks!
This commit is contained in:
parent
5accd5c8ea
commit
d4d15ee521
14
index.d.ts
vendored
Normal file
14
index.d.ts
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import * as React from "react";
|
||||||
|
import * as ReactNative from "react-native";
|
||||||
|
|
||||||
|
declare module "react-native-linear-gradient" {
|
||||||
|
|
||||||
|
interface LinearGradientProps extends ReactNative.ViewProperties {
|
||||||
|
colors: string[],
|
||||||
|
start?: { x: number, y: number },
|
||||||
|
end?: { x: number, y: number },
|
||||||
|
locations?: number[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export default class LinearGradient extends React.Component<LinearGradientProps, any> { }
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user