File tree Expand file tree Collapse file tree 4 files changed +11
-7
lines changed
Expand file tree Collapse file tree 4 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @codifycli/ink-form" ,
33 "type" : " module" ,
4- "version" : " 0.0.7 " ,
4+ "version" : " 0.0.8 " ,
55 "description" : " Complex user-friendly form component for Codify" ,
66 "main" : " lib/index.js" ,
77 "exports" : " ./lib/index.js" ,
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ export const Form: React.FC<FormProps> = props => {
135135
136136 setSections ( newTabs ) ;
137137 setValue ( [ ...value ] ) ;
138- onChangeTab ( Math . min ( currentTab , sections . length - 2 ) ) ;
138+ onChangeTab ( Math . max ( currentTab - 1 , 0 ) ) ;
139139 }
140140
141141 const upperFirstLetter = ( s ?: string ) : string | undefined => {
@@ -198,7 +198,7 @@ export const Form: React.FC<FormProps> = props => {
198198 { ! editingField && (
199199 < Box flexDirection = 'column' marginTop = { 1 } >
200200 < Box flexDirection = "row" >
201- < Button label = "[D]uplicate resource" id = { 'addButton' } onClicked = { ( ) => duplicateCurrentSection ( ) } />
201+ < Button label = "[A]dd resource" id = { 'addButton' } onClicked = { ( ) => duplicateCurrentSection ( ) } />
202202 < Button label = "[R]emove resource" id = { 'removeButton' } isEnabled = { sections . length > 1 } onClicked = { ( ) => removeCurrentSection ( ) } />
203203 < SubmitButton canSubmit = { canSubmitForm } onSubmit = { onSubmitForm } />
204204 </ Box >
Original file line number Diff line number Diff line change @@ -29,8 +29,12 @@ export const FormHeader: React.FC<
2929 ) ;
3030
3131 return (
32- < Box borderStyle = "double" width = "100%" flexDirection = "column" ref = { props . headerRef } >
33- < Box width = "100%" >
32+ < Box
33+ borderStyle = "single"
34+ width = "100%"
35+ flexDirection = "column"
36+ ref = { props . headerRef } >
37+ < Box width = "100%" marginBottom = { 1 } >
3438 < Box flexGrow = { 1 } >
3539 < Text >
3640 < Text bold > { props . form . title } </ Text >
@@ -40,7 +44,7 @@ export const FormHeader: React.FC<
4044 </ Text >
4145 </ Box >
4246 </ Box >
43- < Box width = "100%" >
47+ < Box width = "100%" marginBottom = { 0 } >
4448 < Box flexWrap = 'wrap' >
4549 { ! props . editingField ? (
4650 sections . map ( ( section , id ) => (
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ export function Test() {
4141 } }
4242 form = { {
4343 title : "Need more info to identify resources for import" ,
44- description : 'multiples could exist' ,
44+ description : 'multiples could exist on the system ' ,
4545 sections : [
4646 {
4747 title : "asdf-global" ,
You can’t perform that action at this time.
0 commit comments