Skip to content

Commit

Permalink
Framework: split RichText component (part 1) (#15212)
Browse files Browse the repository at this point in the history
* Framework: move RichText component to rich-text package

* Add style attr

* Fix deprecated matcher

* Simplify

* Remove dead code

* Mark block related props unstable

* Mark block related props unstable

* Clean up

* Add inline doc

* Move doc block to export statement

* Do not mutate props

* Move rich text native to separate package (#16219)

* Move React Native RichText to new package

* Fix multiline reading.

* Move default styles to component.

* Move tests to component.

* Fix paste on title
  • Loading branch information
ellatrix authored Jun 25, 2019
1 parent 2183295 commit ebd94e2
Show file tree
Hide file tree
Showing 21 changed files with 2,308 additions and 1,992 deletions.
10 changes: 10 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import { orderBy } from 'lodash';
import { __ } from '@wordpress/i18n';
import { Toolbar, Slot, DropdownMenu } from '@wordpress/components';

const FormatToolbar = ( { controls } ) => {
const FormatToolbar = () => {
return (
<div className="editor-format-toolbar block-editor-format-toolbar">
<Toolbar>
{ controls.map( ( format ) =>
{ [ 'bold', 'italic', 'link' ].map( ( format ) =>
<Slot name={ `RichText.ToolbarControls.${ format }` } key={ format } />
) }
<Slot name="RichText.ToolbarControls">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

import { Toolbar, Slot } from '@wordpress/components';

const FormatToolbar = ( { controls } ) => {
const FormatToolbar = () => {
return (
<Toolbar>
{ controls.map( ( format ) =>
{ [ 'bold', 'italic', 'link' ].map( ( format ) =>
<Slot name={ `RichText.ToolbarControls.${ format }` } key={ format } />
) }
<Slot name="RichText.ToolbarControls" />
Expand Down
Loading

0 comments on commit ebd94e2

Please sign in to comment.