File tree Expand file tree Collapse file tree 5 files changed +22
-3
lines changed Expand file tree Collapse file tree 5 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -37,9 +37,11 @@ const useStyles = createUseStyles({
37
37
export default function Add ( {
38
38
addElem,
39
39
hidden,
40
+ tooltipDescription,
40
41
} : {
41
42
addElem : ( choice : string ) => void ,
42
43
hidden ? : boolean ,
44
+ tooltipDescription ?: string ,
43
45
} ) : Node {
44
46
const classes = useStyles ( ) ;
45
47
const [ popoverOpen , setPopoverOpen ] = useState ( false ) ;
@@ -55,7 +57,7 @@ export default function Add({
55
57
/>
56
58
</ span >
57
59
< UncontrolledTooltip placement = 'top' target = { `${ elementId } _add` } >
58
- Create new form element
60
+ { tooltipDescription || ' Create new form element' }
59
61
</ UncontrolledTooltip >
60
62
< Popover
61
63
placement = 'bottom'
Original file line number Diff line number Diff line change @@ -249,7 +249,14 @@ export default function Card({
249
249
TypeSpecificParameters = { TypeSpecificParameters}
250
250
/ >
251
251
</Collapse >
252
- { addElem ? < Add addElem = { ( choice : string ) => addElem ( choice ) } /> : '' }
252
+ { addElem ? (
253
+ < Add
254
+ tooltipDescription = { ( ( mods || { } ) . tooltipDescriptions || { } ) . add }
255
+ addElem = { ( choice : string ) => addElem ( choice ) }
256
+ />
257
+ ) : (
258
+ ''
259
+ ) }
253
260
< / R e a c t .F r a g m e n t >
254
261
) ;
255
262
}
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ export default function CardGallery({
77
77
{ componentArr . length === 0 && < h5 > No components in "definitions"</ h5 > }
78
78
< div className = 'form_footer' >
79
79
< Add
80
+ tooltipDescription = { ( ( mods || { } ) . tooltipDescriptions || { } ) . add }
80
81
addElem = { ( choice : string ) => {
81
82
if ( choice === 'card' ) {
82
83
addCardObj ( {
Original file line number Diff line number Diff line change @@ -348,6 +348,7 @@ export default function FormBuilder({
348
348
</ div >
349
349
< div className = { `form-footer ${ classes . formFooter } ` } >
350
350
< Add
351
+ tooltipDescription = { ( ( mods || { } ) . tooltipDescriptions || { } ) . add }
351
352
addElem = { ( choice : string ) => {
352
353
if ( choice === 'card' ) {
353
354
addCardObj ( {
Original file line number Diff line number Diff line change @@ -438,6 +438,7 @@ export default function Section({
438
438
</ div >
439
439
< div className = 'section-footer' >
440
440
< Add
441
+ tooltipDescription = { ( ( mods || { } ) . tooltipDescriptions || { } ) . add }
441
442
addElem = { ( choice : string ) => {
442
443
if ( choice === 'card' ) {
443
444
addCardObj ( {
@@ -520,7 +521,14 @@ export default function Section({
520
521
TypeSpecificParameters = { CardDefaultParameterInputs }
521
522
/>
522
523
</ Collapse >
523
- { addElem ? < Add addElem = { ( choice : string ) => addElem ( choice ) } /> : '' }
524
+ { addElem ? (
525
+ < Add
526
+ tooltipDescription = { ( ( mods || { } ) . tooltipDescriptions || { } ) . add }
527
+ addElem = { ( choice : string ) => addElem ( choice ) }
528
+ />
529
+ ) : (
530
+ ''
531
+ ) }
524
532
</ React . Fragment >
525
533
) ;
526
534
}
You can’t perform that action at this time.
0 commit comments