Skip to content

Commit

Permalink
Display no description placeholder for not belonged videos
Browse files Browse the repository at this point in the history
  • Loading branch information
fluiddot committed May 31, 2023
1 parent 2c94d44 commit bcd652b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ import VideoNotOwnedWarning from '../video-not-owned-warning';
*/
export default function DetailsPanel( { attributes, setAttributes, videoBelongToSite } ) {
const { title, description } = attributes;
const descriptionPlaceholder = videoBelongToSite
? __( 'Add description', 'jetpack-videopress-pkg' )
: __( 'No description', 'jetpack-videopress-pkg' );

return (
<PanelBody title={ __( 'Details', 'jetpack-videopress-pkg' ) }>
Expand All @@ -32,7 +35,7 @@ export default function DetailsPanel( { attributes, setAttributes, videoBelongTo
<BottomSheetTextControl
initialValue={ description }
onChange={ value => setAttributes( { description: value } ) }
placeholder={ __( 'Add description', 'jetpack-videopress-pkg' ) }
placeholder={ descriptionPlaceholder }
label={ __( 'Description', 'jetpack-videopress-pkg' ) }
disabled={ ! videoBelongToSite }
/>
Expand Down

0 comments on commit bcd652b

Please sign in to comment.