Skip to content

Commit

Permalink
Polish up settings block
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Fusco <[email protected]>
  • Loading branch information
josephfusco committed Nov 1, 2023
1 parent 5301858 commit 903ad5f
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions wp-blocks/AcfFieldTypeSettingsBlock.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { gql } from '@apollo/client'
import { Fragment } from 'react'

export function AcfFieldTypeSettingsBlock({fieldTypeSettingsBlockFields}) {
const { fieldTypeSettings } = fieldTypeSettingsBlockFields
Expand All @@ -10,18 +11,18 @@ export function AcfFieldTypeSettingsBlock({fieldTypeSettingsBlockFields}) {
const { acfFieldName, impactOnWpgraphql } = fieldTypeSettingsMeta

return (
<div key={id} className="mb-4">
<h3 className="mb-2">{name}</h3>
<code className="">{acfFieldName}</code>
<ul>
<li className={description ? '' : 'italic text-gray-400'}>
{description || 'Description not yet documented'}
<Fragment key={id}>
<h3 key={'h3' + id} className="mt-2">{name}</h3>
{acfFieldName && <code>{acfFieldName}</code>}
<ul key={'ul' + id}>
<li>
{description || <span className='italic'>Description not yet documented</span>}
</li>
<li className={impactOnWpgraphql ? '' : 'italic text-gray-400'}>
{impactOnWpgraphql ? <span dangerouslySetInnerHTML={{ __html: impactOnWpgraphql }} /> : 'Impact on WPGraphQL not yet documented'}
<li>
{impactOnWpgraphql ? <span dangerouslySetInnerHTML={{ __html: impactOnWpgraphql }} /> : <span className='italic'>Impact on WPGraphQL not yet documented</span>}
</li>
</ul>
</div>
</Fragment>
);
})}
</>
Expand Down

0 comments on commit 903ad5f

Please sign in to comment.