ToolJet/frontend/src/Editor/Components/verticalDivider.jsx
Manish Kushare 817e367fdd
New widget: vertical divider (#2971)
* created VerticalDivider widget

* updated widget icon

* changed the width of the widget container, placed the vertical separator at the center of the widget
2022-05-05 20:03:12 +05:30

16 lines
539 B
JavaScript

import React from 'react';
export const VerticalDivider = function Divider({ styles, height, width }) {
const { visibility, dividerColor } = styles;
const color = dividerColor ?? '#E7E8EA';
return (
<div className="row" style={{ display: visibility ? 'flex' : 'none', padding: '0 8px', width, height }}>
<div className="col-6"></div>
<div
className="col-6 border-right"
style={{ height, width: '1px', backgroundColor: color, padding: '0rem', marginLeft: '0.5rem' }}
></div>
</div>
);
};