Skip to content

Commit

Permalink
Add dividers for simple ObjectWidget
Browse files Browse the repository at this point in the history
  • Loading branch information
tiberiuichim committed Sep 14, 2020
1 parent f4e7e87 commit 7ca0994
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions src/Widget/ObjectWidget.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import React from 'react';
import PropTypes from 'prop-types';
import { Tab } from 'semantic-ui-react';
import { Tab, Divider, Item } from 'semantic-ui-react';

import Field from '@plone/volto/components/manage/Form/Field';

Expand Down Expand Up @@ -88,15 +88,19 @@ const ObjectWidget = ({
);

return schema.fieldsets.length === 1 ? (
<FieldSet
data={schema.fieldsets[0]}
index={0}
schema={schema}
errors={errors}
value={value}
onChange={onChange}
id={id}
/>
<>
<Divider />
<FieldSet
data={schema.fieldsets[0]}
index={0}
schema={schema}
errors={errors}
value={value}
onChange={onChange}
id={id}
/>
<Divider />
</>
) : (
<Tab panes={schema.fieldsets.map(createTab)} /> // lazy loading
);
Expand Down

0 comments on commit 7ca0994

Please sign in to comment.