File tree 5 files changed +53
-4
lines changed
5 files changed +53
-4
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ type Prop = {
31
31
properties : Array < string >
32
32
}
33
33
} ,
34
+ defaultValue : string ,
34
35
description : string
35
36
} ;
36
37
@@ -101,12 +102,13 @@ export default function ListProps() {
101
102
102
103
return (
103
104
< CollapseContainer collapsed = { index !== 0 } key = { index } title = { key } >
104
- < table >
105
+ < table className = "table table-striped table-hover table-sm" >
105
106
< thead >
106
107
< tr >
107
108
< th > Name</ th >
108
109
< th > Type</ th >
109
110
< th > Required</ th >
111
+ < th width = "20%" > Default Value</ th >
110
112
< th > Description</ th >
111
113
</ tr >
112
114
</ thead >
@@ -117,9 +119,12 @@ export default function ListProps() {
117
119
< tr key = { key } >
118
120
< td > { key } </ td >
119
121
< td title = { value . flowType . raw } >
120
- < span className = { classNames ( value . flowType . raw ? 'has-tooltip' : null ) } > { value . flowType . name } </ span >
122
+ < span className = { classNames ( value . flowType . raw ? 'has-tooltip' : null ) } >
123
+ { value . flowType . name === 'signature' ? value . flowType . type : value . flowType . name }
124
+ </ span >
121
125
</ td >
122
126
< td > { value . required . toString ( ) } </ td >
127
+ < td > { value . defaultValue ? value . defaultValue . value : null } </ td >
123
128
< td dangerouslySetInnerHTML = { { __html : markdown . toHTML ( value . description ) } } > </ td >
124
129
</ tr >
125
130
) ;
Original file line number Diff line number Diff line change 137
137
},
138
138
"description" : " Additional class selectors to pass to the `pretty` element."
139
139
},
140
+ "prettySelector" : {
141
+ "required" : false ,
142
+ "flowType" : {
143
+ "name" : " string"
144
+ },
145
+ "defaultValue" : {
146
+ "computed" : false ,
147
+ "value" : " pretty"
148
+ },
149
+ "description" : " Set this to your custom value for `$pretty--class-name`. If you have not changed this in `.scss` then _do not modify this prop_."
150
+ },
140
151
"value" : {
141
152
"required" : false ,
142
153
"flowType" : {
405
416
},
406
417
"description" : " Additional class selectors to pass to the `pretty` element."
407
418
},
419
+ "prettySelector" : {
420
+ "required" : false ,
421
+ "flowType" : {
422
+ "name" : " string"
423
+ },
424
+ "defaultValue" : {
425
+ "computed" : false ,
426
+ "value" : " pretty"
427
+ },
428
+ "description" : " Set this to your custom value for `$pretty--class-name`. If you have not changed this in `.scss` then _do not modify this prop_."
429
+ },
408
430
"value" : {
409
431
"required" : false ,
410
432
"flowType" : {
698
720
},
699
721
"description" : " Additional class selectors to pass to the `pretty` element."
700
722
},
723
+ "prettySelector" : {
724
+ "required" : false ,
725
+ "flowType" : {
726
+ "name" : " string"
727
+ },
728
+ "defaultValue" : {
729
+ "computed" : false ,
730
+ "value" : " pretty"
731
+ },
732
+ "description" : " Set this to your custom value for `$pretty--class-name`. If you have not changed this in `.scss` then _do not modify this prop_."
733
+ },
701
734
"value" : {
702
735
"required" : false ,
703
736
"flowType" : {
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ function App() {
80
80
< div className = "col-md-8 mx-auto" >
81
81
< section className = "section" id = "installation" > < Installation /> </ section >
82
82
</ div >
83
- < div className = "col-md-8 mx-auto" >
83
+ < div className = "col-md-12 mx-auto" >
84
84
< section className = "section" id = "list-props" > < ListProps /> </ section >
85
85
</ div >
86
86
< div className = "col-md-8 mx-auto" >
Original file line number Diff line number Diff line change @@ -324,3 +324,6 @@ table * { cursor: default; }
324
324
border-bottom : 1px dotted black ;
325
325
cursor : help ;
326
326
}
327
+ .table {
328
+ th { border-top : 0 none ; }
329
+ }
Original file line number Diff line number Diff line change @@ -62,6 +62,12 @@ export type InputProps = {
62
62
*/
63
63
className ?: string ,
64
64
65
+ /**
66
+ * Set this to your custom value for `$pretty--class-name`. If you have not changed
67
+ * this in `.scss` then _do not modify this prop_.
68
+ */
69
+ prettySelector ?: string ,
70
+
65
71
/**
66
72
* Specify a value for the underlying `input` element.
67
73
*/
@@ -186,7 +192,7 @@ function Input(props: InputProps) {
186
192
< div
187
193
data-testid = "pcr-wrapper"
188
194
className = { classNames (
189
- 'pretty' ,
195
+ props . prettySelector ,
190
196
animation ? PREFIX + animation : null ,
191
197
className ,
192
198
shape ? PREFIX + shape : null ,
@@ -211,4 +217,6 @@ function Input(props: InputProps) {
211
217
) ;
212
218
}
213
219
220
+ Input . defaultProps = { prettySelector : 'pretty' } ;
221
+
214
222
export default Input ;
You can’t perform that action at this time.
0 commit comments