From ea13c769186e20f6ca9f8333ea6b8961b32f8821 Mon Sep 17 00:00:00 2001 From: wassname Date: Fri, 8 Apr 2016 14:21:58 +0800 Subject: [PATCH] Added react-tagcloud --- react-select/react-select-tests.tsx | 163 ++++++++++++++++++------ react-select/react-select.d.ts | 139 ++++++++++++++++++-- react-tagcloud/react-tagcloud-tests.tsx | 102 +++++++++++++++ react-tagcloud/react-tagcloud.d.ts | 41 ++++++ 4 files changed, 398 insertions(+), 47 deletions(-) create mode 100644 react-tagcloud/react-tagcloud-tests.tsx create mode 100644 react-tagcloud/react-tagcloud.d.ts diff --git a/react-select/react-select-tests.tsx b/react-select/react-select-tests.tsx index cc2cc7376..e42fde53b 100644 --- a/react-select/react-select-tests.tsx +++ b/react-select/react-select-tests.tsx @@ -7,32 +7,79 @@ import * as ReactDOM from "react-dom"; import * as Select from "react-select"; -import * as React from "react"; -import * as ReactDOM from "react-dom"; - -import * as Select from "react-select"; +// some example values +const options = [{ label: "Bar", value: "bar" }]; +const value = [{ label: "Foo", value: "foo", clearableValue: false }]; +const func: any = (newValue: any, event: any) => { return; }; +const filterOption = (options: ReactSelect.Option, filter: string) => options; +const filterOptions = (options: ReactSelect.Option[], filter: string, currentValues: (string | number)[]) => options; +const newOptionCreator = (input: string) => ({ label: input, value: input }); +const loadOptions = (input: string, callback: (options: any[]) => {}) => { }; class SelectTest extends React.Component, {}> { render() { - const options: ReactSelect.Option[] = [{ label: "Foo", value: "bar" }]; - const onChange = (value: any) => console.log(value); return