Skip to content

Commit

Permalink
fix: Button children string array
Browse files Browse the repository at this point in the history
  • Loading branch information
1uokun committed Sep 9, 2024
1 parent d4ea6e8 commit ce08b34
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions components/button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import {
GestureResponderEvent,
StyleProp,
StyleSheet,
Text,
TouchableHighlight,
TouchableHighlightProps,
View,
ViewStyle,
} from 'react-native'
import { WithTheme, WithThemeStyles } from '../style'
import AntmView from '../view'
import { ButtonPropsType } from './PropsType'
import buttonStyles, { ButtonStyles } from './style/index'

Expand Down Expand Up @@ -140,11 +140,7 @@ export default class Button extends React.Component<ButtonProps, any> {
size="small"
/>
) : null}
{typeof this.props.children === 'string' ? (
<Text style={textStyle}>{this.props.children}</Text>
) : (
<>{this.props.children}</>
)}
<AntmView style={textStyle}>{this.props.children}</AntmView>
</View>
</TouchableHighlight>
)
Expand Down

0 comments on commit ce08b34

Please sign in to comment.