Skip to content

Commit

Permalink
[RNMobile] Enable Pullquote block (#21930)
Browse files Browse the repository at this point in the history
  • Loading branch information
ceyhun authored Apr 30, 2020
1 parent ed06638 commit 87d4b10
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 29 deletions.
2 changes: 1 addition & 1 deletion packages/block-library/src/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export const registerCoreBlocks = () => {
latestPosts,
devOnly( verse ),
cover,
devOnly( pullquote ),
pullquote,
].forEach( registerBlock );

setDefaultBlockName( paragraph.name );
Expand Down
58 changes: 30 additions & 28 deletions packages/block-library/src/pullquote/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { includes } from 'lodash';
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
import { Component } from '@wordpress/element';
import { Component, Platform } from '@wordpress/element';
import {
RichText,
ContrastChecker,
Expand Down Expand Up @@ -169,33 +169,35 @@ class PullQuoteEdit extends Component {
) }
</BlockQuote>
</Figure>
<InspectorControls>
<PanelColorSettings
title={ __( 'Color settings' ) }
colorSettings={ [
{
value: mainColor.color,
onChange: this.pullQuoteMainColorSetter,
label: __( 'Main color' ),
},
{
value: textColor.color,
onChange: this.pullQuoteTextColorSetter,
label: __( 'Text color' ),
},
] }
>
{ isSolidColorStyle && (
<ContrastChecker
{ ...{
textColor: textColor.color,
backgroundColor: mainColor.color,
} }
isLargeText={ false }
/>
) }
</PanelColorSettings>
</InspectorControls>
{ Platform.OS === 'web' && (
<InspectorControls>
<PanelColorSettings
title={ __( 'Color settings' ) }
colorSettings={ [
{
value: mainColor.color,
onChange: this.pullQuoteMainColorSetter,
label: __( 'Main color' ),
},
{
value: textColor.color,
onChange: this.pullQuoteTextColorSetter,
label: __( 'Text color' ),
},
] }
>
{ isSolidColorStyle && (
<ContrastChecker
{ ...{
textColor: textColor.color,
backgroundColor: mainColor.color,
} }
isLargeText={ false }
/>
) }
</PanelColorSettings>
</InspectorControls>
) }
</>
);
}
Expand Down

0 comments on commit 87d4b10

Please sign in to comment.