Showing
2 changed files
with
15 additions
and
1 deletions
| @@ -5,6 +5,7 @@ import { | @@ -5,6 +5,7 @@ import { | ||
| 5 | useDynamicStyleSheet, | 5 | useDynamicStyleSheet, |
| 6 | } from 'react-native-dark-mode'; | 6 | } from 'react-native-dark-mode'; |
| 7 | import { colorPreset } from '../../design'; | 7 | import { colorPreset } from '../../design'; |
| 8 | +import { View, StyleSheet } from 'react-native'; | ||
| 8 | 9 | ||
| 9 | const dynamicStyles = new DynamicStyleSheet({ | 10 | const dynamicStyles = new DynamicStyleSheet({ |
| 10 | containerStyle: { | 11 | containerStyle: { |
| @@ -22,8 +23,18 @@ const dynamicStyles = new DynamicStyleSheet({ | @@ -22,8 +23,18 @@ const dynamicStyles = new DynamicStyleSheet({ | ||
| 22 | rightSubtitleStyle: { | 23 | rightSubtitleStyle: { |
| 23 | color: colorPreset.labelColor.primary, | 24 | color: colorPreset.labelColor.primary, |
| 24 | }, | 25 | }, |
| 26 | + opaqueSeparator: { | ||
| 27 | + backgroundColor: colorPreset.separator.opaque, | ||
| 28 | + height: StyleSheet.hairlineWidth, | ||
| 29 | + marginLeft: 16, | ||
| 30 | + }, | ||
| 25 | }); | 31 | }); |
| 26 | 32 | ||
| 33 | +export const Divider = () => { | ||
| 34 | + const styles = useDynamicStyleSheet(dynamicStyles); | ||
| 35 | + return <View style={styles.opaqueSeparator} />; | ||
| 36 | +}; | ||
| 37 | + | ||
| 27 | export const ListItem = ({ | 38 | export const ListItem = ({ |
| 28 | containerStyle, | 39 | containerStyle, |
| 29 | titleStyle, | 40 | titleStyle, |
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { useWindowDimensions } from 'react-native'; | 2 | import { useWindowDimensions } from 'react-native'; |
| 3 | -import { ListItem, BGScroll, Card } from '../component/View'; | 3 | +import { ListItem, BGScroll, Card, Divider } from '../component/View'; |
| 4 | 4 | ||
| 5 | export default () => { | 5 | export default () => { |
| 6 | const { width, height, fontScale, scale } = useWindowDimensions(); | 6 | const { width, height, fontScale, scale } = useWindowDimensions(); |
| @@ -12,12 +12,15 @@ export default () => { | @@ -12,12 +12,15 @@ export default () => { | ||
| 12 | rightTitle={`${width}pt`} | 12 | rightTitle={`${width}pt`} |
| 13 | rightSubtitle={`${width * scale}px`} | 13 | rightSubtitle={`${width * scale}px`} |
| 14 | /> | 14 | /> |
| 15 | + <Divider /> | ||
| 15 | <ListItem | 16 | <ListItem |
| 16 | title={'height'} | 17 | title={'height'} |
| 17 | rightTitle={`${height}pt`} | 18 | rightTitle={`${height}pt`} |
| 18 | rightSubtitle={`${height * scale}px`} | 19 | rightSubtitle={`${height * scale}px`} |
| 19 | /> | 20 | /> |
| 21 | + <Divider /> | ||
| 20 | <ListItem title={'fontScale'} rightTitle={fontScale.toString()} /> | 22 | <ListItem title={'fontScale'} rightTitle={fontScale.toString()} /> |
| 23 | + <Divider /> | ||
| 21 | <ListItem title={'scale'} rightTitle={scale.toString()} /> | 24 | <ListItem title={'scale'} rightTitle={scale.toString()} /> |
| 22 | </Card> | 25 | </Card> |
| 23 | </BGScroll> | 26 | </BGScroll> |
-
Please register or login to post a comment