mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 14:39:34 +01:00
fix font sizes
This commit is contained in:
@@ -162,19 +162,18 @@ export const ActionSheetTagsSection = ({item}) => {
|
|||||||
marginTop: 5,
|
marginTop: 5,
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
}}>
|
}}>
|
||||||
<Text
|
{tags.filter(
|
||||||
style={{
|
(o) => o.noteIds.length >= 1 && !note.tags.find((t) => t === o.title),
|
||||||
fontFamily: WEIGHT.regular,
|
).length === 0 ? null : (
|
||||||
fontSize: SIZE.xs,
|
<Text
|
||||||
color: colors.pri,
|
style={{
|
||||||
}}>
|
fontFamily: WEIGHT.regular,
|
||||||
{tags.filter(
|
fontSize: SIZE.xs,
|
||||||
(o) =>
|
color: colors.pri,
|
||||||
o.noteIds.length >= 1 && !note.tags.find((t) => t === o.title),
|
}}>
|
||||||
).length === 0
|
{"Suggested: "}
|
||||||
? ''
|
</Text>
|
||||||
: 'Suggested: '}
|
)}
|
||||||
</Text>
|
|
||||||
|
|
||||||
{suggestions.map((tag) => (
|
{suggestions.map((tag) => (
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
@@ -195,7 +194,7 @@ export const ActionSheetTagsSection = ({item}) => {
|
|||||||
<Text
|
<Text
|
||||||
style={{
|
style={{
|
||||||
fontFamily: WEIGHT.regular,
|
fontFamily: WEIGHT.regular,
|
||||||
fontSize: SIZE.xs,
|
fontSize: SIZE.sm,
|
||||||
color: colors.pri,
|
color: colors.pri,
|
||||||
}}>
|
}}>
|
||||||
<Text
|
<Text
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ import {Button} from '../Button';
|
|||||||
import {PremiumTag} from '../Premium/PremiumTag';
|
import {PremiumTag} from '../Premium/PremiumTag';
|
||||||
import {PressableButton} from '../PressableButton';
|
import {PressableButton} from '../PressableButton';
|
||||||
import {Toast} from '../Toast';
|
import {Toast} from '../Toast';
|
||||||
|
import Heading from '../Typography/Heading';
|
||||||
|
import Paragraph from '../Typography/Paragraph';
|
||||||
import {ActionSheetColorsSection} from './ActionSheetColorsSection';
|
import {ActionSheetColorsSection} from './ActionSheetColorsSection';
|
||||||
import {ActionSheetTagsSection} from './ActionSheetTagsSection';
|
import {ActionSheetTagsSection} from './ActionSheetTagsSection';
|
||||||
const w = Dimensions.get('window').width;
|
const w = Dimensions.get('window').width;
|
||||||
@@ -306,15 +308,7 @@ export const ActionSheetComponent = ({
|
|||||||
size={DDS.isTab ? SIZE.xl : SIZE.lg}
|
size={DDS.isTab ? SIZE.xl : SIZE.lg}
|
||||||
color={rowItem.name === 'Delete' ? colors.errorText : colors.accent}
|
color={rowItem.name === 'Delete' ? colors.errorText : colors.accent}
|
||||||
/>
|
/>
|
||||||
|
<Paragraph>{rowItem.name}</Paragraph>
|
||||||
<Text
|
|
||||||
style={{
|
|
||||||
fontFamily: WEIGHT.regular,
|
|
||||||
fontSize: DDS.isTab ? SIZE.sm : SIZE.xs + 1,
|
|
||||||
color: colors.pri,
|
|
||||||
}}>
|
|
||||||
{rowItem.name}
|
|
||||||
</Text>
|
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
) : null;
|
) : null;
|
||||||
|
|
||||||
@@ -349,14 +343,7 @@ export const ActionSheetComponent = ({
|
|||||||
color={colors.pri}
|
color={colors.pri}
|
||||||
size={SIZE.md}
|
size={SIZE.md}
|
||||||
/>
|
/>
|
||||||
<Text
|
<Paragraph>{item.name}</Paragraph>
|
||||||
style={{
|
|
||||||
fontFamily: WEIGHT.regular,
|
|
||||||
fontSize: SIZE.sm,
|
|
||||||
color: colors.pri,
|
|
||||||
}}>
|
|
||||||
{item.name}
|
|
||||||
</Text>
|
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
@@ -474,16 +461,9 @@ export const ActionSheetComponent = ({
|
|||||||
paddingHorizontal: 0,
|
paddingHorizontal: 0,
|
||||||
}}>
|
}}>
|
||||||
{!note.id && !note.dateCreated ? (
|
{!note.id && !note.dateCreated ? (
|
||||||
<Text
|
<Paragraph style={{marginVertical: 10}}>
|
||||||
style={{
|
Start writing to save your note.
|
||||||
width: '100%',
|
</Paragraph>
|
||||||
textAlign: 'center',
|
|
||||||
marginVertical: 10,
|
|
||||||
color: colors.icon,
|
|
||||||
fontFamily: WEIGHT.regular,
|
|
||||||
}}>
|
|
||||||
Please start writing to save your note.
|
|
||||||
</Text>
|
|
||||||
) : (
|
) : (
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
@@ -491,21 +471,13 @@ export const ActionSheetComponent = ({
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
marginVertical: 10,
|
marginVertical: 10,
|
||||||
}}>
|
}}>
|
||||||
<Text
|
<Heading size={SIZE.md}>{note.title.replace('\n', '')}</Heading>
|
||||||
numberOfLines={1}
|
|
||||||
style={{
|
|
||||||
color: colors.heading,
|
|
||||||
fontSize: SIZE.sm + 1,
|
|
||||||
fontFamily: WEIGHT.bold,
|
|
||||||
maxWidth: '100%',
|
|
||||||
}}>
|
|
||||||
{note.title.replace('\n', '')}
|
|
||||||
</Text>
|
|
||||||
<Text
|
<Text
|
||||||
numberOfLines={2}
|
numberOfLines={2}
|
||||||
style={{
|
style={{
|
||||||
fontSize: SIZE.sm - 1,
|
fontSize: SIZE.sm,
|
||||||
color: colors.pri + 'B3',
|
color: colors.pri,
|
||||||
fontFamily: WEIGHT.regular,
|
fontFamily: WEIGHT.regular,
|
||||||
width: '100%',
|
width: '100%',
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
@@ -524,7 +496,7 @@ export const ActionSheetComponent = ({
|
|||||||
<Text
|
<Text
|
||||||
style={{
|
style={{
|
||||||
color: colors.icon,
|
color: colors.icon,
|
||||||
fontSize: SIZE.xs - 1,
|
fontSize: SIZE.xs,
|
||||||
textAlignVertical: 'center',
|
textAlignVertical: 'center',
|
||||||
fontFamily: WEIGHT.regular,
|
fontFamily: WEIGHT.regular,
|
||||||
marginTop: 2.5,
|
marginTop: 2.5,
|
||||||
@@ -567,7 +539,7 @@ export const ActionSheetComponent = ({
|
|||||||
style={{
|
style={{
|
||||||
color: 'white',
|
color: 'white',
|
||||||
fontFamily: WEIGHT.regular,
|
fontFamily: WEIGHT.regular,
|
||||||
fontSize: SIZE.xxs,
|
fontSize: SIZE.xs,
|
||||||
maxWidth: '100%',
|
maxWidth: '100%',
|
||||||
}}>
|
}}>
|
||||||
{topic.title}
|
{topic.title}
|
||||||
@@ -583,7 +555,7 @@ export const ActionSheetComponent = ({
|
|||||||
onPress={onPressSync}
|
onPress={onPressSync}
|
||||||
style={{
|
style={{
|
||||||
color: colors.accent,
|
color: colors.accent,
|
||||||
fontSize: SIZE.xs - 1,
|
fontSize: SIZE.xs,
|
||||||
textAlignVertical: 'center',
|
textAlignVertical: 'center',
|
||||||
fontFamily: WEIGHT.regular,
|
fontFamily: WEIGHT.regular,
|
||||||
marginTop: 5,
|
marginTop: 5,
|
||||||
@@ -592,6 +564,7 @@ export const ActionSheetComponent = ({
|
|||||||
borderColor: colors.accent,
|
borderColor: colors.accent,
|
||||||
paddingHorizontal: 5,
|
paddingHorizontal: 5,
|
||||||
borderRadius: 2,
|
borderRadius: 2,
|
||||||
|
height: 20,
|
||||||
}}>
|
}}>
|
||||||
{user && user.lastSynced > note.dateEdited
|
{user && user.lastSynced > note.dateEdited
|
||||||
? 'Synced'
|
? 'Synced'
|
||||||
@@ -601,7 +574,7 @@ export const ActionSheetComponent = ({
|
|||||||
|
|
||||||
{refreshing ? (
|
{refreshing ? (
|
||||||
<ActivityIndicator
|
<ActivityIndicator
|
||||||
style={{marginTop: 5}}
|
style={{marginTop: 5, height: 20}}
|
||||||
size={12}
|
size={12}
|
||||||
color={colors.accent}
|
color={colors.accent}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -8,8 +8,9 @@ import {eClearSearch} from '../../utils/Events';
|
|||||||
import NavigationService from '../../services/Navigation';
|
import NavigationService from '../../services/Navigation';
|
||||||
import {showContext} from '../../utils';
|
import {showContext} from '../../utils';
|
||||||
import {PressableButton} from '../PressableButton';
|
import {PressableButton} from '../PressableButton';
|
||||||
import {SIZE, WEIGHT} from "../../utils/SizeUtils";
|
import {SIZE, WEIGHT} from '../../utils/SizeUtils';
|
||||||
import {DDS} from "../../services/DeviceDetection";
|
import {DDS} from '../../services/DeviceDetection';
|
||||||
|
import Paragraph from '../Typography/Paragraph';
|
||||||
|
|
||||||
export const MenuListItem = ({item, index, noTextMode, ignore, testID}) => {
|
export const MenuListItem = ({item, index, noTextMode, ignore, testID}) => {
|
||||||
const [state, dispatch] = useTracked();
|
const [state, dispatch] = useTracked();
|
||||||
@@ -24,15 +25,15 @@ export const MenuListItem = ({item, index, noTextMode, ignore, testID}) => {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
dispatch({
|
dispatch({
|
||||||
type: Actions.HEADER_VERTICAL_MENU,
|
type: Actions.HEADER_VERTICAL_MENU,
|
||||||
state: item.name === "Home",
|
state: item.name === 'Home',
|
||||||
});
|
});
|
||||||
eSendEvent(eClearSearch);
|
eSendEvent(eClearSearch);
|
||||||
}
|
}
|
||||||
if (item.func) {
|
if (item.func) {
|
||||||
item.func()
|
item.func();
|
||||||
} else {
|
} else {
|
||||||
NavigationService.navigate(item.name)
|
NavigationService.navigate(item.name);
|
||||||
}
|
}
|
||||||
if (item.close) {
|
if (item.close) {
|
||||||
NavigationService.closeDrawer();
|
NavigationService.closeDrawer();
|
||||||
@@ -45,7 +46,7 @@ export const MenuListItem = ({item, index, noTextMode, ignore, testID}) => {
|
|||||||
key={item.name + index}
|
key={item.name + index}
|
||||||
onPress={_onPress}
|
onPress={_onPress}
|
||||||
onLongPress={(event) => {
|
onLongPress={(event) => {
|
||||||
showContext(event, item.name).then(r => r);
|
showContext(event, item.name).then((r) => r);
|
||||||
}}
|
}}
|
||||||
color={
|
color={
|
||||||
currentScreen === item.name.toLowerCase() ? colors.shade : 'transparent'
|
currentScreen === item.name.toLowerCase() ? colors.shade : 'transparent'
|
||||||
@@ -78,16 +79,7 @@ export const MenuListItem = ({item, index, noTextMode, ignore, testID}) => {
|
|||||||
color={colors.accent}
|
color={colors.accent}
|
||||||
size={DDS.isTab ? SIZE.md + 5 : SIZE.md + 1}
|
size={DDS.isTab ? SIZE.md + 5 : SIZE.md + 1}
|
||||||
/>
|
/>
|
||||||
{noTextMode ? null : (
|
{noTextMode ? null : <Paragraph size={SIZE.md}>{item.name}</Paragraph>}
|
||||||
<Text
|
|
||||||
style={{
|
|
||||||
fontFamily: WEIGHT.regular,
|
|
||||||
fontSize: SIZE.sm,
|
|
||||||
color: colors.heading,
|
|
||||||
}}>
|
|
||||||
{item.name}
|
|
||||||
</Text>
|
|
||||||
)}
|
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{item.switch && !noTextMode ? (
|
{item.switch && !noTextMode ? (
|
||||||
|
|||||||
@@ -60,8 +60,8 @@ export const normalize = (size) => {
|
|||||||
export const SIZE = {
|
export const SIZE = {
|
||||||
xxs: 9 * scale.fontScale,
|
xxs: 9 * scale.fontScale,
|
||||||
xs: 11 * scale.fontScale,
|
xs: 11 * scale.fontScale,
|
||||||
sm: normalize(13) * scale.fontScale,
|
sm: normalize(12.5) * scale.fontScale,
|
||||||
md: normalize(16) * scale.fontScale,
|
md: normalize(15) * scale.fontScale,
|
||||||
lg: normalize(21) * scale.fontScale,
|
lg: normalize(21) * scale.fontScale,
|
||||||
xl: normalize(24) * scale.fontScale,
|
xl: normalize(24) * scale.fontScale,
|
||||||
xxl: normalize(28) * scale.fontScale,
|
xxl: normalize(28) * scale.fontScale,
|
||||||
@@ -71,8 +71,8 @@ export const SIZE = {
|
|||||||
export function updateSize() {
|
export function updateSize() {
|
||||||
SIZE.xxs = 9 * scale.fontScale;
|
SIZE.xxs = 9 * scale.fontScale;
|
||||||
SIZE.xs = 10 * scale.fontScale;
|
SIZE.xs = 10 * scale.fontScale;
|
||||||
SIZE.sm = normalize(13) * scale.fontScale;
|
SIZE.sm = normalize(12.5) * scale.fontScale;
|
||||||
SIZE.md = normalize(16) * scale.fontScale;
|
SIZE.md = normalize(15) * scale.fontScale;
|
||||||
SIZE.lg = normalize(21) * scale.fontScale;
|
SIZE.lg = normalize(21) * scale.fontScale;
|
||||||
SIZE.xl = normalize(24) * scale.fontScale;
|
SIZE.xl = normalize(24) * scale.fontScale;
|
||||||
SIZE.xxl = normalize(28) * scale.fontScale;
|
SIZE.xxl = normalize(28) * scale.fontScale;
|
||||||
|
|||||||
Reference in New Issue
Block a user