From bb2dec6fb4dde4729039bfbf0c7f706b2b633e16 Mon Sep 17 00:00:00 2001 From: Nico Hauser Date: Wed, 18 Jan 2023 16:12:40 +0100 Subject: [PATCH] Minor cleaning of styles --- fe1-web/src/core/components/BuildInfo.tsx | 45 +++++++++-------------- fe1-web/src/core/styles/typography.ts | 4 ++ 2 files changed, 22 insertions(+), 27 deletions(-) diff --git a/fe1-web/src/core/components/BuildInfo.tsx b/fe1-web/src/core/components/BuildInfo.tsx index 8450837f51..2c0a8c02fc 100644 --- a/fe1-web/src/core/components/BuildInfo.tsx +++ b/fe1-web/src/core/components/BuildInfo.tsx @@ -1,8 +1,8 @@ import Constants from 'expo-constants'; import React from 'react'; -import { StyleSheet, View, Linking, Text } from 'react-native'; +import { StyleSheet, View, Linking, Text, ViewStyle } from 'react-native'; -import { Color, Spacing, Typography } from 'core/styles'; +import { Spacing, Typography } from 'core/styles'; const styles = StyleSheet.create({ container: { @@ -10,41 +10,32 @@ const styles = StyleSheet.create({ bottom: Spacing.x05, left: Spacing.x05, zIndex: 100, - color: Color.inactive, - fontFamily: 'monospace', - textTransform: 'uppercase', display: 'flex', flexDirection: 'row', alignItems: 'center', - ...Typography.minuscule, - }, - link: { - textDecorationLine: 'none', - color: Color.inactive, - ...Typography.minuscule, - }, + } as ViewStyle, }); const BuildInfo = () => { return ( - Linking.openURL( - `https://github.com/dedis/popstellar/releases/tag/${Constants?.expoConfig?.extra?.appVersion}`, - ) - }> - {Constants?.expoConfig?.extra?.appVersion} + style={[Typography.minuscule, Typography.inactive, Typography.code, Typography.uppercase]}> + + Linking.openURL( + `https://github.com/dedis/popstellar/releases/tag/${Constants?.expoConfig?.extra?.appVersion}`, + ) + }> + {Constants?.expoConfig?.extra?.appVersion} + + | + Linking.openURL(Constants?.expoConfig?.extra?.buildURL)}> + {Constants?.expoConfig?.extra?.shortSHA} + + | + {Constants?.expoConfig?.extra?.buildDate} - | - Linking.openURL(Constants?.expoConfig?.extra?.buildURL)}> - {Constants?.expoConfig?.extra?.shortSHA} - - | - {Constants?.expoConfig?.extra?.buildDate} ); }; diff --git a/fe1-web/src/core/styles/typography.ts b/fe1-web/src/core/styles/typography.ts index 4ba53746c2..f9c6ce10b6 100644 --- a/fe1-web/src/core/styles/typography.ts +++ b/fe1-web/src/core/styles/typography.ts @@ -101,3 +101,7 @@ export const importantCentered: TextStyle = { ...baseCentered, fontWeight: 'bold', }; + +export const uppercase: TextStyle = { + textTransform: 'uppercase', +};