File tree Expand file tree Collapse file tree 5 files changed +53
-4
lines changed Expand file tree Collapse file tree 5 files changed +53
-4
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ type Prop = {
3131 properties : Array < string >
3232 }
3333 } ,
34+ defaultValue : string ,
3435 description : string
3536} ;
3637
@@ -101,12 +102,13 @@ export default function ListProps() {
101102
102103 return (
103104 < CollapseContainer collapsed = { index !== 0 } key = { index } title = { key } >
104- < table >
105+ < table className = "table table-striped table-hover table-sm" >
105106 < thead >
106107 < tr >
107108 < th > Name</ th >
108109 < th > Type</ th >
109110 < th > Required</ th >
111+ < th width = "20%" > Default Value</ th >
110112 < th > Description</ th >
111113 </ tr >
112114 </ thead >
@@ -117,9 +119,12 @@ export default function ListProps() {
117119 < tr key = { key } >
118120 < td > { key } </ td >
119121 < 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 >
121125 </ td >
122126 < td > { value . required . toString ( ) } </ td >
127+ < td > { value . defaultValue ? value . defaultValue . value : null } </ td >
123128 < td dangerouslySetInnerHTML = { { __html : markdown . toHTML ( value . description ) } } > </ td >
124129 </ tr >
125130 ) ;
Original file line number Diff line number Diff line change 137137 },
138138 "description" : " Additional class selectors to pass to the `pretty` element."
139139 },
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+ },
140151 "value" : {
141152 "required" : false ,
142153 "flowType" : {
405416 },
406417 "description" : " Additional class selectors to pass to the `pretty` element."
407418 },
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+ },
408430 "value" : {
409431 "required" : false ,
410432 "flowType" : {
698720 },
699721 "description" : " Additional class selectors to pass to the `pretty` element."
700722 },
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+ },
701734 "value" : {
702735 "required" : false ,
703736 "flowType" : {
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ function App() {
8080 < div className = "col-md-8 mx-auto" >
8181 < section className = "section" id = "installation" > < Installation /> </ section >
8282 </ div >
83- < div className = "col-md-8 mx-auto" >
83+ < div className = "col-md-12 mx-auto" >
8484 < section className = "section" id = "list-props" > < ListProps /> </ section >
8585 </ div >
8686 < div className = "col-md-8 mx-auto" >
Original file line number Diff line number Diff line change @@ -324,3 +324,6 @@ table * { cursor: default; }
324324 border-bottom : 1px dotted black ;
325325 cursor : help ;
326326}
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 = {
6262 */
6363 className ?: string ,
6464
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+
6571 /**
6672 * Specify a value for the underlying `input` element.
6773 */
@@ -186,7 +192,7 @@ function Input(props: InputProps) {
186192 < div
187193 data-testid = "pcr-wrapper"
188194 className = { classNames (
189- 'pretty' ,
195+ props . prettySelector ,
190196 animation ? PREFIX + animation : null ,
191197 className ,
192198 shape ? PREFIX + shape : null ,
@@ -211,4 +217,6 @@ function Input(props: InputProps) {
211217 ) ;
212218}
213219
220+ Input . defaultProps = { prettySelector : 'pretty' } ;
221+
214222export default Input ;
You can’t perform that action at this time.
0 commit comments