Skip to content

Commit

Permalink
fix: static text field styles
Browse files Browse the repository at this point in the history
  • Loading branch information
nzambello committed Aug 12, 2021
1 parent b5e127d commit 6296dcb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
4 changes: 4 additions & 0 deletions src/components/Field.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@
.block.form .ui.form .field .wrapper > label {
margin-bottom: 0;
}

.block.form .ui.form .field .static-text {
margin: 2rem 0;
}
17 changes: 6 additions & 11 deletions src/components/Field.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,18 +189,13 @@ const Field = ({
onChange={onChange}
value={value}
/>
) : value?.data ? (
<div
className="static-text"
dangerouslySetInnerHTML={{ __html: value.data }}
/>
) : (
<div className="static-text">
{value ? (
redraft(
value,
config.settings.ToHTMLRenderers,
config.settings.ToHTMLOptions,
)
) : (
<br />
)}
</div>
<br />
))}
{config.blocks.blocksConfig.form.additionalFields?.reduce((acc, val) => {
if (val.id === field_type)
Expand Down

0 comments on commit 6296dcb

Please sign in to comment.