Skip to content

Commit

Permalink
Enhance styling of nextpage block using the Hr element (#11354)
Browse files Browse the repository at this point in the history
* Add a line into nextpage block using the Hr element

* Fix lint problems

* Fix scss lint issue
  • Loading branch information
pinarol authored Nov 1, 2018
1 parent 52119c3 commit 563e292
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/block-library/src/nextpage/edit.native.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* External dependencies
*/
import { View, Text } from 'react-native';
import { View } from 'react-native';
import Hr from 'react-native-hr';

/**
* WordPress dependencies
Expand All @@ -18,7 +19,9 @@ export default function NextPageEdit( { attributes } ) {

return (
<View className={ styles[ 'block-library-nextpage__container' ] }>
<Text>{ customText }</Text>
<Hr text={ customText }
textStyle={ styles[ 'block-library-nextpage__text' ] }
lineStyle={ styles[ 'block-library-nextpage__line' ] } />
</View>
);
}
9 changes: 9 additions & 0 deletions packages/block-library/src/nextpage/editor.native.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,12 @@
align-items: center;
padding: 4px 4px 4px 4px;
}

.block-library-nextpage__line {
background-color: #555d66;
height: 2;
}

.block-library-nextpage__text {
text-decoration-style: solid;
}

0 comments on commit 563e292

Please sign in to comment.