mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-22 00:19:04 +00:00
Added Border color style property to Container widgets (#4202)
* Update Container.jsx * Update widgetConfig.js * Update frontend/src/Editor/Components/Container.jsx small edit Co-authored-by: Arpit <arpitnath42@gmail.com> * Update frontend/src/Editor/WidgetManager/widgetConfig.js small edit Co-authored-by: Arpit <arpitnath42@gmail.com> * Update widgetConfig.js shifted border color next to border sradius * Update Container.jsx small changes * Update widgetConfig.js Co-authored-by: Arpit <arpitnath42@gmail.com>
This commit is contained in:
parent
ca5fe39751
commit
70a90b2443
2 changed files with 11 additions and 2 deletions
|
|
@ -12,14 +12,15 @@ export const Container = function Container({
|
|||
styles,
|
||||
darkMode,
|
||||
}) {
|
||||
const { visibility, disabledState, borderRadius } = styles;
|
||||
const { visibility, disabledState, borderRadius,borderColor } = styles;
|
||||
const backgroundColor =
|
||||
['#fff', '#ffffffff'].includes(styles.backgroundColor) && darkMode ? '#232E3C' : styles.backgroundColor;
|
||||
const computedStyles = {
|
||||
backgroundColor,
|
||||
borderRadius: borderRadius ? parseFloat(borderRadius) : 0,
|
||||
border: `1px solid ${borderColor}`,
|
||||
height,
|
||||
display: visibility ? 'flex' : 'none',
|
||||
borderRadius: borderRadius ? parseFloat(borderRadius) : 0,
|
||||
};
|
||||
|
||||
const parentRef = useRef(null);
|
||||
|
|
|
|||
|
|
@ -2051,6 +2051,13 @@ export const widgets = [
|
|||
},
|
||||
},
|
||||
},
|
||||
borderColor: {
|
||||
type: 'color',
|
||||
displayName: 'Border color',
|
||||
validation: {
|
||||
schema: { type: 'string' },
|
||||
},
|
||||
},
|
||||
visibility: {
|
||||
type: 'toggle',
|
||||
displayName: 'Visibility',
|
||||
|
|
@ -2079,6 +2086,7 @@ export const widgets = [
|
|||
styles: {
|
||||
backgroundColor: { value: '' },
|
||||
borderRadius: { value: '0' },
|
||||
borderColor: { value: '#fff' },
|
||||
visibility: { value: '{{true}}' },
|
||||
disabledState: { value: '{{false}}' },
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue