From 1c318c4569967bda540a19eee02ff1ba2ead9d9f Mon Sep 17 00:00:00 2001 From: Meykel Gruel Date: Fri, 31 Aug 2018 10:10:11 +0200 Subject: [PATCH 1/4] * Added `name` & `className` props to Fab * Added `name` prop to Button * Added `readOnly` & `defaultValue` props to Input * Added `defaultChecked`, `name` & `className` props to Radio * Added `name` & `className` props to Checkbox * Added `name` & `className` props to Select * Added `modifier` & `name` props to Switch --- types/react-onsenui/index.d.ts | 20 +++++++++++++++++--- types/react-onsenui/react-onsenui-tests.tsx | 5 +++-- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/types/react-onsenui/index.d.ts b/types/react-onsenui/index.d.ts index 1b90fb1c50..02f925fb56 100644 --- a/types/react-onsenui/index.d.ts +++ b/types/react-onsenui/index.d.ts @@ -291,12 +291,15 @@ export class Fab extends Component<{ position?: string, disabled?: boolean, onClick?(e?: React.MouseEvent): void, + name?: string, + className?: string }, any> {} export class Button extends Component<{ modifier?: string, disabled?: boolean, ripple?: boolean, + name?: string, className?: string, onClick?(e?: React.MouseEvent): void }, any> {} @@ -304,8 +307,10 @@ export class Button extends Component<{ export class Input extends Component<{ modifier?: string, disabled?: boolean, + readOnly?: boolean, onChange?: (e: React.ChangeEvent) => void, value?: string, + defaultValue?: string, checked?: boolean, placeholder?: string, type?: string, @@ -321,7 +326,10 @@ export class Radio extends Component<{ onChange?(e: Event): void, value?: string, checked?: boolean, - inputId?: string + defaultChecked?: boolean, + inputId?: string, + name?: string, + className?: string }, any> {} export class Checkbox extends Component<{ @@ -330,7 +338,9 @@ export class Checkbox extends Component<{ onChange?(e: Event): void, value?: string, checked?: boolean, - inputId?: string + inputId?: string, + name?: string, + className?: string }, any> {} export class Range extends Component<{ @@ -349,14 +359,18 @@ export class Select extends Component<{ autofocus?: boolean, required?: boolean, form?: string, - size?: string + size?: string, + name?: string, + className?: string }, any> {} export class Switch extends Component<{ + modifier?: string, onChange?(e: SwitchChangeEvent): void, checked?: boolean, disabled?: boolean, inputId?: string, + name?: string, className?: string }, any> {} diff --git a/types/react-onsenui/react-onsenui-tests.tsx b/types/react-onsenui/react-onsenui-tests.tsx index a2c2534914..477359b748 100644 --- a/types/react-onsenui/react-onsenui-tests.tsx +++ b/types/react-onsenui/react-onsenui-tests.tsx @@ -2,7 +2,7 @@ import * as React from "react"; import * as ReactDOM from "react-dom"; import { SplitterSide, Splitter, SplitterContent, - Page, Input, Button, + Page, Input, Button, Radio, } from "react-onsenui"; class AppState { @@ -38,7 +38,8 @@ export class App extends React.Component { Test page - + +