Skip to content

Commit

Permalink
Display image source url
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Oct 15, 2023
1 parent 8d2fa39 commit a61eb7a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,8 @@
flex-grow: 1;
justify-content: center;
}

.enable-responsive-image__url {
color: $gray-700;
font-size: 12px;
}
2 changes: 2 additions & 0 deletions src/source-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { MediaUpload, store as blockEditorStore } from '@wordpress/block-editor'
import { useSelect } from '@wordpress/data';
import { store as coreStore } from '@wordpress/core-data';
import { chevronUp, chevronDown } from '@wordpress/icons';
import { filterURLForDisplay } from '@wordpress/url';
import type { Media, Source } from './types';

/**
Expand Down Expand Up @@ -188,6 +189,7 @@ export default function SourceEditor( {
/>
{ !! id && srcset && (
<>
<div className="enable-responsive-image__url">{ filterURLForDisplay( srcset, 35 ) }</div>
<ToggleGroupControl
__nextHasNoMarginBottom
isBlock
Expand Down

0 comments on commit a61eb7a

Please sign in to comment.