Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

Commit

Permalink
Use View instead of Touchable opacity
Browse files Browse the repository at this point in the history
  • Loading branch information
Morgan Laco committed Oct 5, 2018
1 parent ad6f9f7 commit 8337ede
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions templates/component.tsx.ejs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react"
import { ViewStyle, TouchableOpacity, TouchableOpacityProperties } from "react-native"
import { View, ViewStyle } from "react-native"
<% if (props.newDomain) { -%>
import { Text } from "../shared/text"
<% } else if (props.sharedComponent) { -%>
Expand All @@ -8,7 +8,7 @@ import { Text } from "../text"
import { Text } from "../../shared/text"
<% } -%>

export interface <%= props.pascalName %>Props extends TouchableOpacityProperties {
export interface <%= props.pascalName %>Props {
/**
* Text which is looked up via i18n.
*/
Expand Down Expand Up @@ -36,8 +36,8 @@ export function <%= props.pascalName %>(props: <%= props.pascalName %>Props) {
const textStyle = { }

return (
<TouchableOpacity style={style} {...rest}>
<View style={style} {...rest}>
<Text tx={tx} text={text} style={textStyle} />
</TouchableOpacity>
</View>
)
}

0 comments on commit 8337ede

Please sign in to comment.