git ssb

1+

Daan Patchwork / manyverse



Commit 1d28192ad8069b9ae51edaf4e0ef55d0fe4c772c

dx: [and] fix About and Thanks dialog styles

Andre Staltz committed on 1/4/2020, 2:37:13 PM
Parent: b6353dd4cafb3f1069049d395c4b051ad4cb1995

Files changed

src/frontend/components/dialogs/Dialog.tschanged
src/frontend/components/dialogs/DialogButton.tschanged
src/frontend/components/dialogs/TextDialog.tschanged
src/frontend/global-styles/dimens.tschanged
src/frontend/screens/compose/styles.tschanged
src/frontend/components/dialogs/Dialog.tsView
@@ -28,18 +28,30 @@
2828 maxHeight: 500,
2929 maxWidth: 270,
3030 minHeight: 100,
3131 backgroundColor: Palette.backgroundText,
32- borderRadius: Platform.select({ios: 10, default: 0}),
32+ borderRadius: Platform.select({
33+ default: 2,
34+ ios: 10,
35+ }),
36+ ...Platform.select({
37+ android: {
38+ minWidth: 300,
39+ elevation: 8,
40+ },
41+ }),
3342 },
3443
3544 content: {
3645 paddingVertical: Dimensions.verticalSpaceBig,
3746 paddingHorizontal: Dimensions.horizontalSpaceBig,
3847 color: Palette.text,
3948 fontSize: Typography.fontSizeNormal,
4049 fontFamily: Typography.fontFamilyReadableText,
41- textAlign: Platform.select({ios: 'center', default: 'left'}),
50+ textAlign: Platform.select({
51+ default: 'left',
52+ ios: 'center',
53+ }),
4254 },
4355 });
4456
4557 export type Props = {};
src/frontend/components/dialogs/DialogButton.tsView
@@ -15,8 +15,9 @@
1515 } from 'react-native';
1616 import {h} from '@cycle/react';
1717 import {Palette} from '../../global-styles/palette';
1818 import {Typography} from '../../global-styles/typography';
19+import {Dimensions} from '../../global-styles/dimens';
1920
2021 const Touchable = Platform.select<any>({
2122 android: TouchableNativeFeedback,
2223 default: TouchableOpacity,
@@ -26,29 +27,44 @@
2627 container: {
2728 flexDirection: 'row',
2829 alignItems: 'center',
2930 backgroundColor: 'transparent',
30- minHeight: 48,
3131 ...Platform.select({
32+ default: {
33+ justifyContent: 'center',
34+ width: 70,
35+ height: 40,
36+ position: 'absolute',
37+ bottom: Dimensions.verticalSpaceLarge,
38+ right: Dimensions.horizontalSpaceBig,
39+ },
3240 ios: {
41+ minHeight: 48,
3342 justifyContent: 'center',
3443 borderTopColor: Palette.backgroundTextWeak,
3544 borderTopWidth: 1,
3645 borderBottomLeftRadius: 10,
3746 borderBottomRightRadius: 10,
3847 },
39- android: {
40- justifyContent: 'flex-end',
41- },
4248 }),
4349 },
4450
4551 text: {
46- color: Palette.textBrand,
4752 textAlignVertical: 'center',
48- fontWeight: Platform.select({ios: 'normal', default: 'bold'}),
49- fontSize: Typography.fontSizeBig,
50- textAlign: Platform.select({ios: 'center', android: 'right'}),
53+ ...Platform.select({
54+ default: {
55+ color: Palette.text,
56+ fontWeight: 'bold',
57+ fontSize: Typography.fontSizeNormal,
58+ textAlign: 'right',
59+ },
60+ ios: {
61+ color: Palette.textBrand,
62+ fontWeight: 'normal',
63+ fontSize: Typography.fontSizeBig,
64+ textAlign: 'center',
65+ },
66+ }),
5167 },
5268 });
5369
5470 export type Props = {
src/frontend/components/dialogs/TextDialog.tsView
@@ -14,23 +14,35 @@
1414 import DialogButton from './DialogButton';
1515
1616 export const styles = StyleSheet.create({
1717 content: {
18- paddingVertical: Dimensions.verticalSpaceBig,
19- paddingHorizontal: Dimensions.horizontalSpaceBig,
18+ ...Platform.select({
19+ default: {
20+ paddingVertical: Dimensions.verticalSpaceLarger,
21+ paddingHorizontal: Dimensions.horizontalSpaceLarge,
22+ fontFamily: 'normal',
23+ textAlign: 'left',
24+ marginBottom: Dimensions.verticalSpaceLarge * 2,
25+ },
26+ ios: {
27+ paddingVertical: Dimensions.verticalSpaceBig,
28+ paddingHorizontal: Dimensions.horizontalSpaceBig,
29+ fontFamily: Typography.fontFamilyReadableText,
30+ textAlign: 'center',
31+ },
32+ }),
33+ ...Platform.select({android: {minWidth: 300}}),
2034 color: Palette.textWeak,
2135 fontSize: Typography.fontSizeNormal,
22- fontFamily: Typography.fontFamilyReadableText,
23- textAlign: Platform.select({ios: 'center', default: 'left'}),
2436 },
2537
2638 title: {
2739 fontSize: Typography.fontSizeBig,
2840 fontWeight: 'bold',
2941 color: Palette.text,
3042 },
3143
32- spacer: {fontSize: 5},
44+ spacer: {fontSize: Platform.select({ios: 5, default: 15})},
3345 });
3446
3547 export type Props = {
3648 title?: string;
src/frontend/global-styles/dimens.tsView
@@ -13,8 +13,10 @@
1313 horizontalSpaceNormal: 12,
1414 horizontalSpaceSmall: 7,
1515 horizontalSpaceTiny: 4,
1616
17+ verticalSpaceLarger: 28,
18+ verticalSpaceLarge: 20,
1719 verticalSpaceBig: 14,
1820 verticalSpaceNormal: 10,
1921 verticalSpaceSmall: 7,
2022 verticalSpaceTiny: 3,
src/frontend/screens/compose/styles.tsView
@@ -77,9 +77,12 @@
7777 paddingBottom: Dimensions.verticalSpaceSmall,
7878 paddingLeft: Dimensions.horizontalSpaceSmall,
7979 paddingRight: 1,
8080 marginRight: Dimensions.horizontalSpaceBig,
81- marginTop: Platform.select({ios: 20, default: Dimensions.verticalSpaceBig}),
81+ marginTop: Platform.select({
82+ ios: Dimensions.verticalSpaceLarge,
83+ default: Dimensions.verticalSpaceBig,
84+ }),
8285 alignSelf: 'stretch',
8386 fontSize: Typography.fontSizeBig,
8487 textAlign: 'left',
8588 textAlignVertical: 'top',

Built with git-ssb-web