@@ -82,7 +82,11 @@ const Demo = () => {
8282 < div>
8383 < header> {blocks .logo } {blocks .title }< / header>
8484 {fields .sort ((a , b ) => a .index - b .index ).map ((item , idx ) => {
85- return < label key= {item .name + idx}> {item .children }< / label>
85+ return (
86+ < div key= {item .name + idx}>
87+ < label> {item .children }{item .children ? .props ? .extra }< / label>
88+ < / div>
89+ );
8690 })}
8791 < div>
8892 {buttons .sort ((a , b ) => a .index - b .index ).map ((item , idx ) => {
@@ -98,6 +102,15 @@ const Demo = () => {
98102 < / Render>
99103 < Login .Block name= " logo" tagName= " span" > ⚛️< / Login .Block >
100104 < Login .Block name= " title" tagName= " span" > Login< / Login .Block >
105+ < Login .Textarea name= " note" >< / Login .Textarea >
106+ < Login .Select name= " select" >
107+ < option value= " w" selected= " " > Choose an item... < / option>
108+ < option value= " 1" > One< / option>
109+ < option value= " 2" > Two< / option>
110+ < option value= " 3" > Three< / option>
111+ < option value= " 4" > Four< / option>
112+ < / Login .Select >
113+ < Login .Input name= " checkbox" type= " checkbox" index= {3 } extra= {< span> Remember me < / span> } / >
101114 < Login .Input name= " username" index= {1 } placeholder= " Please input Username" / >
102115 < Login .Input name= " password" index= {0 } placeholder= " please enter password" / >
103116 < Login .Button name= " submit" index= {1 } type= " submit" > Submit< / Login .Button >
@@ -158,6 +171,59 @@ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>
158171export declare const Input: FC <PropsWithChildren <InputProps >>;
159172` ` `
160173
174+ ### ` Login .Textarea `
175+
176+ ` ` ` jsx
177+ import Login , { Textarea } from ' react-login-page' ;
178+
179+ < Login .Textarea name= " note" / >
180+ < Textarea name= " note" / >
181+ ` ` `
182+
183+ ` ` ` ts
184+ import React , { FC , PropsWithChildren } from ' react' ;
185+ export interface TextareaProps extends React .InputHTMLAttributes < HTMLTextAreaElement > {
186+ name ?: string ;
187+ /** Used to define the name of form controls */
188+ rename ?: string ;
189+ /** Can be shown or hidden with controls */
190+ visible ?: boolean ;
191+ /** "index" refers to the use of indexes to control the order of controls, which can provide more flexible API encapsulation. */
192+ index ?: number ;
193+ }
194+ export declare const Textarea: FC <PropsWithChildren <TextareaProps >>;
195+ ` ` `
196+
197+ ### ` Login .Select `
198+
199+ ` ` ` jsx
200+ import Login , { Select } from ' react-login-page' ;
201+
202+ < Login .Select name= " selectname" >
203+ < option value= " 1" > One< / option>
204+ < option value= " 2" > Two< / option>
205+ < / Login .Select >
206+
207+ < Select name= " selectname" >
208+ < option value= " 1" > One< / option>
209+ < option value= " 2" > Two< / option>
210+ < / Select>
211+ ` ` `
212+
213+ ` ` ` ts
214+ import React , { FC , PropsWithChildren } from ' react' ;
215+ export interface SelectProps extends React .InputHTMLAttributes < HTMLSelectElement > {
216+ name ?: string ;
217+ /** Used to define the name of form controls */
218+ rename ?: string ;
219+ /** Can be shown or hidden with controls */
220+ visible ?: boolean ;
221+ /** "index" refers to the use of indexes to control the order of controls, which can provide more flexible API encapsulation. */
222+ index ?: number ;
223+ }
224+ export declare const Select: FC <PropsWithChildren <SelectProps >>;
225+ ` ` `
226+
161227### ` Login .Button `
162228
163229` ` ` jsx
0 commit comments