Skip to content

Commit

Permalink
Replace span with help prop
Browse files Browse the repository at this point in the history
  • Loading branch information
brookewp committed Feb 8, 2023
1 parent c47da73 commit 116ddc3
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions packages/block-editor/src/components/date-format-picker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,12 @@ export default function DateFormatPicker( {
<fieldset className="block-editor-date-format-picker">
<VisuallyHidden as="legend">{ __( 'Date format' ) }</VisuallyHidden>
<ToggleControl
label={
<>
{ __( 'Default format' ) }
<span className="block-editor-date-format-picker__default-format-toggle-control__hint">
{ dateI18n( defaultFormat, EXAMPLE_DATE ) }
</span>
</>
}
__nextHasNoMarginBottom
label={ __( 'Default format' ) }
help={ `${ __( 'Example:' ) } ${ dateI18n(
defaultFormat,
EXAMPLE_DATE
) }` }
checked={ ! format }
onChange={ ( checked ) =>
onChange( checked ? null : defaultFormat )
Expand Down

0 comments on commit 116ddc3

Please sign in to comment.