diff --git a/packages/apollos-ui-connected/src/FeaturesFeedConnected/featuresFeedComponentMapper.js b/packages/apollos-ui-connected/src/FeaturesFeedConnected/featuresFeedComponentMapper.js index 121a8580e..dc0a6e03a 100644 --- a/packages/apollos-ui-connected/src/FeaturesFeedConnected/featuresFeedComponentMapper.js +++ b/packages/apollos-ui-connected/src/FeaturesFeedConnected/featuresFeedComponentMapper.js @@ -17,6 +17,7 @@ import ButtonFeature from '../features/ButtonFeature'; import CommentListFeatureConnected from '../CommentListFeatureConnected'; import AddCommentFeatureConnected from '../AddCommentFeatureConnected'; import FollowPeopleFeature from '../FollowPeopleFeature'; +import HtmlFeature from '../features/HtmlFeature'; const MAPPINGS = { ActionListFeature: ActionListFeatureConnected, @@ -37,6 +38,7 @@ const MAPPINGS = { TextFeature, WebviewFeature, ButtonFeature, + HtmlFeature, }; const featuresFeedComponentMapper = ({ diff --git a/packages/apollos-ui-connected/src/features/HtmlFeature.js b/packages/apollos-ui-connected/src/features/HtmlFeature.js new file mode 100644 index 000000000..4b52d3c3a --- /dev/null +++ b/packages/apollos-ui-connected/src/features/HtmlFeature.js @@ -0,0 +1,10 @@ +import HTMLView from '@apollosproject/ui-htmlview'; +import { PaddedView } from '@apollosproject/ui-kit'; + +const HtmlFeature = ({ content }) => ( + + + +); + +export default HtmlFeature; diff --git a/packages/apollos-ui-fragments/src/features.js b/packages/apollos-ui-fragments/src/features.js index 629cd55d1..c44e4d9f9 100644 --- a/packages/apollos-ui-fragments/src/features.js +++ b/packages/apollos-ui-fragments/src/features.js @@ -129,6 +129,9 @@ const LITE_FEATURES_FRAGMENT = gql` } } } + ... on HtmlFeature { + content + } } `; diff --git a/packages/apollos-ui-htmlview/src/HTMLView/ScriptureComponent.js b/packages/apollos-ui-htmlview/src/HTMLView/ScriptureComponent.js deleted file mode 100644 index 2db5a362a..000000000 --- a/packages/apollos-ui-htmlview/src/HTMLView/ScriptureComponent.js +++ /dev/null @@ -1,35 +0,0 @@ -import React from 'react'; -import { Text, StyleSheet } from 'react-native'; -import { useTheme } from '@apollosproject/ui-kit'; -import { useNavigation } from '@react-navigation/native'; -import PropTypes from 'prop-types'; - -const ScriptureComponent = ({ verse, children }) => { - const navigation = useNavigation(); - const theme = useTheme(); - return ( - { - navigation.navigate('Scripture', { reference: verse }); - }} - > - {children} - - ); -}; - -ScriptureComponent.propTypes = { - verse: PropTypes.string.isRequired, - children: PropTypes.node.isRequired, -}; - -const styles = StyleSheet.create({ - buttonLink: ({ colors }) => ({ - color: colors.text.link, - textTransform: 'capitalize', - textDecorationLine: 'underline', - }), -}); - -export default ScriptureComponent;