-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split android and ios sources for InlineCodeBlock component
- Loading branch information
Showing
4 changed files
with
27 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* eslint-disable react/jsx-props-no-spreading */ | ||
import React from 'react'; | ||
import {View} from 'react-native'; | ||
import inlineCodeBlockPropTypes from './inlineCodeBlockPropTypes'; | ||
|
||
const InlineCodeBlock = ({ | ||
TDefaultRenderer, | ||
defaultRendererProps, | ||
boxModelStyle, | ||
textStyle, | ||
}) => ( | ||
<View style={boxModelStyle}> | ||
<TDefaultRenderer style={textStyle} {...defaultRendererProps} /> | ||
</View> | ||
); | ||
|
||
InlineCodeBlock.propTypes = inlineCodeBlockPropTypes; | ||
InlineCodeBlock.displayName = 'InlineCodeBlock'; | ||
export default InlineCodeBlock; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/components/InlineCodeBlock/propTypes.js → ...lineCodeBlock/inlineCodeBlockPropTypes.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import PropTypes from 'prop-types'; | ||
|
||
const propTypes = { | ||
const inlineCodeBlockPropTypes = { | ||
TDefaultRenderer: PropTypes.func.isRequired, | ||
defaultRendererProps: PropTypes.object.isRequired, | ||
boxModelStyle: PropTypes.any.isRequired, | ||
textStyle: PropTypes.any.isRequired | ||
}; | ||
|
||
export default propTypes; | ||
export default inlineCodeBlockPropTypes; |