diff --git a/packages/block-library/src/index.native.js b/packages/block-library/src/index.native.js index 0acf3ee3f49714..3da15242c7cfbd 100644 --- a/packages/block-library/src/index.native.js +++ b/packages/block-library/src/index.native.js @@ -13,6 +13,7 @@ import * as heading from './heading'; import * as more from './more'; import * as paragraph from './paragraph'; import * as image from './image'; +import * as nextpage from './nextpage'; export const registerCoreBlocks = () => { [ @@ -21,6 +22,7 @@ export const registerCoreBlocks = () => { code, more, image, + nextpage, ].forEach( ( { name, settings } ) => { registerBlockType( name, settings ); } ); diff --git a/packages/block-library/src/nextpage/edit.js b/packages/block-library/src/nextpage/edit.js new file mode 100644 index 00000000000000..fb4d16ee52cb17 --- /dev/null +++ b/packages/block-library/src/nextpage/edit.js @@ -0,0 +1,12 @@ +/** + * WordPress dependencies + */ +import { __ } from '@wordpress/i18n'; + +export default function NextPageEdit() { + return ( +
+ { __( 'Page break' ) } +
+ ); +} diff --git a/packages/block-library/src/nextpage/edit.native.js b/packages/block-library/src/nextpage/edit.native.js new file mode 100644 index 00000000000000..e486337e1c47b6 --- /dev/null +++ b/packages/block-library/src/nextpage/edit.native.js @@ -0,0 +1,24 @@ +/** + * External dependencies + */ +import { View, Text } from 'react-native'; + +/** + * WordPress dependencies + */ +import { __ } from '@wordpress/i18n'; + +/** + * Internal dependencies + */ +import styles from './editor.scss'; + +export default function NextPageEdit( { attributes } ) { + const { customText = __( 'Page break' ) } = attributes; + + return ( + + { customText } + + ); +} diff --git a/packages/block-library/src/nextpage/editor.native.scss b/packages/block-library/src/nextpage/editor.native.scss new file mode 100644 index 00000000000000..7101c63e82962a --- /dev/null +++ b/packages/block-library/src/nextpage/editor.native.scss @@ -0,0 +1,6 @@ +// @format + +.block-library-nextpage__container { + align-items: center; + padding: 4px 4px 4px 4px; +} diff --git a/packages/block-library/src/nextpage/index.js b/packages/block-library/src/nextpage/index.js index 02114bd72c0788..ee557a81bb5620 100644 --- a/packages/block-library/src/nextpage/index.js +++ b/packages/block-library/src/nextpage/index.js @@ -5,6 +5,7 @@ import { __ } from '@wordpress/i18n'; import { RawHTML } from '@wordpress/element'; import { createBlock } from '@wordpress/blocks'; import { G, Path, SVG } from '@wordpress/components'; +import edit from './edit'; export const name = 'core/nextpage'; @@ -42,13 +43,7 @@ export const settings = { ], }, - edit() { - return ( -
- { __( 'Page break' ) } -
- ); - }, + edit, save() { return ( diff --git a/packages/notices/package.json b/packages/notices/package.json index 46c86828a70ebc..93e9ac42d9900e 100644 --- a/packages/notices/package.json +++ b/packages/notices/package.json @@ -21,6 +21,7 @@ "build-module" ], "main": "build/index.js", + "react-native": "src/index", "dependencies": { "@babel/runtime": "^7.0.0", "@wordpress/a11y": "file:../a11y",