Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RN-Mobile: Image block placeholder #9850

Merged
merged 6 commits into from
Sep 13, 2018
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/block-library/src/image/edit.native.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/** @format */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, let's remove the Prettier pragma since Prettier is not used in the Gutenberg repo/setup.


import { View, Text } from 'react-native';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I noticed one small thing now though: let's add a section header like this one: https://github.com/WordPress/gutenberg/blob/master/packages/block-library/src/heading/edit.native.js#L6-L9


export default function ImageEdit() {
return (
<View style={ { padding: 12, backgroundColor: '#f2f2f2' } }>
<Text style={ { textAlign: 'center' } }>Image</Text>
</View> );
}
2 changes: 2 additions & 0 deletions packages/block-library/src/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ import * as code from './code';
import * as heading from './heading';
import * as more from './more';
import * as paragraph from './paragraph';
import * as image from './image';

export const registerCoreBlocks = () => {
[
paragraph,
heading,
code,
more,
image,
].forEach( ( { name, settings } ) => {
registerBlockType( name, settings );
} );
Expand Down