Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const StyleguideFieldUsageText = (props) => {
const fieldValue = getFieldValue(props.fields, 'sample');
return (
{/* Basic emission of a number field for editing can be done with the
);
};
*/}
{props.fields &&
props.fields.checkbox &&
props.fields.checkbox.value && (
<li>
<code>checkbox</code> is true
</li>
)}
{!props.fields ||
!props.fields.checkbox ||
(!props.fields.checkbox.value && (
<li>
<code>checkbox</code> is false
</li>
))}
{getFieldValue(props.fields, 'checkbox2', false) && (
<li>
<code>checkbox2</code> is true
</li>
)}
{!getFieldValue(props.fields, 'checkbox2', false) && (
<li>
<code>checkbox2</code> is false
</li>
)}
);
<code>checkbox</code> is true
)}
{!props.fields ||
!props.fields.checkbox ||
(!props.fields.checkbox.value && (
<li>
<code>checkbox</code> is false
</li>
))}
{getFieldValue(props.fields, 'checkbox2', false) && (
<li>
<code>checkbox2</code> is true
</li>
)}
{!getFieldValue(props.fields, 'checkbox2', false) && (
<li>
<code>checkbox2</code> is false
</li>
)}
);