Skip to content

Commit

Permalink
Merge pull request #869 from thundersdata-frontend/rn-issue
Browse files Browse the repository at this point in the history
fix: 修复DatePeriodInput组件在label位置为top时的样式问题
  • Loading branch information
chj-damon authored May 24, 2024
2 parents ba58933 + 05212f4 commit fcbf062
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/tidy-moles-glow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@td-design/react-native-picker': patch
---

fix: 修复DatePeriodInput组件在label位置为top时的样式问题
6 changes: 4 additions & 2 deletions packages/react-native-picker/src/date-period-input/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,15 @@ const DatePeriodInput: FC<DatePeriodInputProps> = ({

const Content = (
<Flex
flex={1}
justifyContent="space-between"
alignItems="center"
borderWidth={ONE_PIXEL}
borderColor="border"
borderRadius="x1"
style={itemHeight ? { height: itemHeight } : {}}
style={{
...(itemHeight ? { height: itemHeight } : {}),
...(labelPosition === 'top' ? {} : { flex: 1 }),
}}
>
<Pressable disabled={disabled} onPress={handleStartPress} activeOpacity={activeOpacity} style={styles.content}>
<Flex>
Expand Down

0 comments on commit fcbf062

Please sign in to comment.