Skip to content

Commit

Permalink
Do not use hard coded fontFamily value, instead use CSS style.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniloercoli committed Feb 5, 2019
1 parent 70836f1 commit 544f096
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-library/src/image/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ export default class ImageEdit extends React.Component {
<View style={ { padding: 12, flex: 1 } }>
<TextInput
style={ { textAlign: 'center' } }
fontFamily={ 'serif' }
fontFamily={ this.props.fontFamily || ( styles[ 'caption-text' ].fontFamily ) }
underlineColorAndroid="transparent"
value={ caption }
placeholder={ __( 'Write caption…' ) }
Expand Down
8 changes: 8 additions & 0 deletions packages/block-library/src/image/styles.native.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// @format

@import "variables.scss";

.imageContainer {
flex: 1;
justify-content: center;
Expand All @@ -15,3 +19,7 @@
flex-direction: column;
align-items: center;
}

.caption-text {
font-family: $default-regular-font;
}

0 comments on commit 544f096

Please sign in to comment.