Skip to content

Commit

Permalink
Truncate inserter items to 3 lines of text
Browse files Browse the repository at this point in the history
  • Loading branch information
talldan committed Jul 18, 2022
1 parent 3f3f1fb commit 733fcd0
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
createBlock,
createBlocksFromInnerBlocksTemplate,
} from '@wordpress/blocks';
import { __experimentalTruncate as Truncate } from '@wordpress/components';
import { ENTER } from '@wordpress/keycodes';

/**
Expand Down Expand Up @@ -135,7 +136,9 @@ function InserterListItem( {
<BlockIcon icon={ item.icon } showColors />
</span>
<span className="block-editor-block-types-list__item-title">
{ item.title }
<Truncate numberOfLines={ 3 }>
{ item.title }
</Truncate>
</span>
</InserterListboxItem>
</div>
Expand Down

0 comments on commit 733fcd0

Please sign in to comment.