| 1 |
const generateBackgroundAttributes = ({ controlName, defaults = {} }) => { |
| 2 |
const { |
| 3 |
[`${controlName}bgType`]: bgType, |
| 4 |
[`${controlName}bgColor`]: bgColor, |
| 5 |
[`${controlName}bgGradient`]: bgGradient, |
| 6 |
} = defaults; |
| 7 |
|
| 8 |
return { |
| 9 |
[`${controlName}bgType`]: { |
| 10 |
type: 'string', |
| 11 |
default: bgType, |
| 12 |
}, |
| 13 |
[`${controlName}bgColor`]: { |
| 14 |
type: 'string', |
| 15 |
default: bgColor, |
| 16 |
}, |
| 17 |
[`${controlName}bgGradient`]: { |
| 18 |
type: 'string', |
| 19 |
default: bgGradient, |
| 20 |
}, |
| 21 |
}; |
| 22 |
}; |
| 23 |
|
| 24 |
export default generateBackgroundAttributes; |
| 25 |
|