From e45a7b6d261cff4692a231a003e061c1de689789 Mon Sep 17 00:00:00 2001 From: Paul Wilde Date: Sat, 10 Feb 2018 22:25:45 +0000 Subject: [PATCH 1/4] Update PostExcerpt component to use TextareaControl. --- editor/components/post-excerpt/index.js | 18 +++++++----------- editor/components/post-excerpt/style.scss | 9 ++++++++- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/editor/components/post-excerpt/index.js b/editor/components/post-excerpt/index.js index fa52257b31069..fe5555cd97146 100644 --- a/editor/components/post-excerpt/index.js +++ b/editor/components/post-excerpt/index.js @@ -7,7 +7,7 @@ import { connect } from 'react-redux'; * WordPress dependencies */ import { __ } from '@wordpress/i18n'; -import { ExternalLink, withInstanceId } from '@wordpress/components'; +import { ExternalLink, TextareaControl } from '@wordpress/components'; /** * Internal Dependencies @@ -16,17 +16,13 @@ import './style.scss'; import { getEditedPostExcerpt } from '../../store/selectors'; import { editPost } from '../../store/actions'; -function PostExcerpt( { excerpt, onUpdateExcerpt, instanceId } ) { - const id = `editor-post-excerpt-${ instanceId }`; - const onChange = ( event ) => onUpdateExcerpt( event.target.value ); - +function PostExcerpt( { excerpt, onUpdateExcerpt } ) { return ( -
- -