mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 22:49:45 +01:00
uniform sizes
This commit is contained in:
@@ -691,7 +691,7 @@ export const ActionSheetComponent = ({
|
||||
/>
|
||||
</PressableButton>
|
||||
|
||||
<Paragraph size={SIZE.xs + 2} style={{textAlign: 'center'}}>
|
||||
<Paragraph size={SIZE.xs + 1} style={{textAlign: 'center'}}>
|
||||
{rowItem.title}
|
||||
</Paragraph>
|
||||
</View>
|
||||
@@ -933,7 +933,7 @@ export const ActionSheetComponent = ({
|
||||
<Icon
|
||||
name="shield-key-outline"
|
||||
color={colors.accent}
|
||||
size={SIZE.sm + SIZE.xs + 2}
|
||||
size={SIZE.sm + SIZE.xs + 1}
|
||||
/>
|
||||
|
||||
<View
|
||||
|
||||
@@ -82,7 +82,7 @@ export const Cta = ({actions, style = {}, color, inline}) => {
|
||||
<Button
|
||||
key={item.title}
|
||||
title={item.title}
|
||||
fontSize={SIZE.xs + 1}
|
||||
fontSize={SIZE.xs}
|
||||
type="gray"
|
||||
onPress={() => onPress(item)}
|
||||
width={null}
|
||||
|
||||
@@ -70,7 +70,7 @@ export const Title = ({heading, headerColor, screen, notebook}) => {
|
||||
}}
|
||||
color={headerColor}>
|
||||
{notebook ? (
|
||||
<Paragraph numberOfLines={1} size={SIZE.xs + 2}>
|
||||
<Paragraph numberOfLines={1} size={SIZE.xs + 1}>
|
||||
{notebook?.title}
|
||||
{'\n'}
|
||||
</Paragraph>
|
||||
|
||||
@@ -342,7 +342,7 @@ const MergeEditor = () => {
|
||||
borderRadius: 100,
|
||||
paddingHorizontal: 12
|
||||
}}
|
||||
fontSize={SIZE.xs + 1}
|
||||
fontSize={SIZE.xs}
|
||||
/>
|
||||
) : null}
|
||||
<View style={{width: 10}} />
|
||||
@@ -356,7 +356,7 @@ const MergeEditor = () => {
|
||||
borderRadius: 100,
|
||||
paddingHorizontal: 12
|
||||
}}
|
||||
fontSize={SIZE.xs + 1}
|
||||
fontSize={SIZE.xs}
|
||||
accentText="light"
|
||||
color={colors.errorText}
|
||||
onPress={onPressDiscardFromPrimaryWebView}
|
||||
@@ -387,7 +387,7 @@ const MergeEditor = () => {
|
||||
marginLeft: 10
|
||||
}}
|
||||
type="accent"
|
||||
fontSize={SIZE.xs + 1}
|
||||
fontSize={SIZE.xs}
|
||||
title={keepContentFrom === 'primary' ? 'Undo' : 'Keep'}
|
||||
onPress={onPressKeepFromPrimaryWebView}
|
||||
/>
|
||||
@@ -473,7 +473,7 @@ const MergeEditor = () => {
|
||||
minWidth: 60
|
||||
}}
|
||||
type="accent"
|
||||
fontSize={SIZE.xs + 1}
|
||||
fontSize={SIZE.xs}
|
||||
onPress={onPressSaveCopyFromSecondaryWebView}
|
||||
title="Save a copy"
|
||||
/>
|
||||
@@ -489,7 +489,7 @@ const MergeEditor = () => {
|
||||
paddingHorizontal: 12,
|
||||
minWidth: 60
|
||||
}}
|
||||
fontSize={SIZE.xs + 1}
|
||||
fontSize={SIZE.xs}
|
||||
accentColor="red"
|
||||
accentText="light"
|
||||
onPress={onPressDiscardFromSecondaryWebView}
|
||||
@@ -520,7 +520,7 @@ const MergeEditor = () => {
|
||||
marginLeft: 10
|
||||
}}
|
||||
type="accent"
|
||||
fontSize={SIZE.xs + 1}
|
||||
fontSize={SIZE.xs}
|
||||
title={keepContentFrom === 'secondary' ? 'Undo' : 'Keep'}
|
||||
onPress={onPressKeepFromSecondaryWebView}
|
||||
/>
|
||||
|
||||
@@ -465,7 +465,7 @@ const MoveNoteComponent = ({close, note, setNote}) => {
|
||||
title="Remove"
|
||||
type="error"
|
||||
height={25}
|
||||
fontSize={SIZE.xs + 1}
|
||||
fontSize={SIZE.xs}
|
||||
style={{
|
||||
margin: 1,
|
||||
marginRight: 5,
|
||||
|
||||
@@ -122,7 +122,7 @@ const NoteItem = ({item, isTrash, tags}) => {
|
||||
height={20}
|
||||
icon="book-outline"
|
||||
type="grayBg"
|
||||
fontSize={SIZE.xs + 1}
|
||||
fontSize={SIZE.xs}
|
||||
iconSize={SIZE.sm}
|
||||
textStyle={{
|
||||
marginRight: 0
|
||||
@@ -183,7 +183,7 @@ const NoteItem = ({item, isTrash, tags}) => {
|
||||
) : null}
|
||||
<TimeSince
|
||||
style={{
|
||||
fontSize: SIZE.xs + 1,
|
||||
fontSize: SIZE.xs,
|
||||
color: colors.icon,
|
||||
marginRight: 6
|
||||
}}
|
||||
@@ -201,7 +201,7 @@ const NoteItem = ({item, isTrash, tags}) => {
|
||||
marginRight: 6
|
||||
}}>
|
||||
<Icon name="attachment" size={SIZE.md} color={colors.icon} />
|
||||
<Paragraph color={colors.icon} size={SIZE.xs + 1}>
|
||||
<Paragraph color={colors.icon} size={SIZE.xs}>
|
||||
10
|
||||
</Paragraph>
|
||||
</View>
|
||||
@@ -254,7 +254,7 @@ const NoteItem = ({item, isTrash, tags}) => {
|
||||
textDecorationLine: 'underline'
|
||||
}}
|
||||
hitSlop={{top: 8, bottom: 12, left: 0, right: 0}}
|
||||
fontSize={SIZE.xs + 1}
|
||||
fontSize={SIZE.xs}
|
||||
style={{
|
||||
borderRadius: 5,
|
||||
paddingHorizontal: 2,
|
||||
|
||||
@@ -93,7 +93,7 @@ export const NotebookItem = ({item, isTopic = false, notebookID, isTrash}) => {
|
||||
fontFamily: null
|
||||
}}
|
||||
type="grayBg"
|
||||
fontSize={SIZE.xs + 1}
|
||||
fontSize={SIZE.xs}
|
||||
icon="bookmark-outline"
|
||||
textStyle={{
|
||||
marginRight: 0
|
||||
@@ -125,7 +125,7 @@ export const NotebookItem = ({item, isTopic = false, notebookID, isTrash}) => {
|
||||
}}>
|
||||
<Paragraph
|
||||
color={colors.accent}
|
||||
size={SIZE.xs + 1}
|
||||
size={SIZE.xs}
|
||||
style={{
|
||||
marginRight: 6
|
||||
}}>
|
||||
@@ -136,7 +136,7 @@ export const NotebookItem = ({item, isTopic = false, notebookID, isTrash}) => {
|
||||
<>
|
||||
<Paragraph
|
||||
color={colors.icon}
|
||||
size={SIZE.xs + 1}
|
||||
size={SIZE.xs}
|
||||
style={{
|
||||
textAlignVertical: 'center',
|
||||
marginRight: 6
|
||||
@@ -146,7 +146,7 @@ export const NotebookItem = ({item, isTopic = false, notebookID, isTrash}) => {
|
||||
</Paragraph>
|
||||
<Paragraph
|
||||
color={colors.accent}
|
||||
size={SIZE.xs + 1}
|
||||
size={SIZE.xs}
|
||||
style={{
|
||||
textAlignVertical: 'center',
|
||||
marginRight: 6
|
||||
@@ -157,7 +157,7 @@ export const NotebookItem = ({item, isTopic = false, notebookID, isTrash}) => {
|
||||
) : (
|
||||
<Paragraph
|
||||
color={colors.icon}
|
||||
size={SIZE.xs + 1}
|
||||
size={SIZE.xs}
|
||||
style={{
|
||||
marginRight: 6
|
||||
}}>
|
||||
@@ -166,7 +166,7 @@ export const NotebookItem = ({item, isTopic = false, notebookID, isTrash}) => {
|
||||
)}
|
||||
<Paragraph
|
||||
color={colors.icon}
|
||||
size={SIZE.xs + 1}
|
||||
size={SIZE.xs}
|
||||
style={{
|
||||
marginRight: 6
|
||||
}}>
|
||||
|
||||
@@ -108,7 +108,7 @@ export const Expiring = () => {
|
||||
await sleep(300);
|
||||
eSendEvent(eOpenPremiumDialog, promo);
|
||||
}}
|
||||
size={SIZE.xs + 2}
|
||||
size={SIZE.xs + 1}
|
||||
style={{
|
||||
textDecorationLine: 'underline',
|
||||
color: colors.icon,
|
||||
@@ -161,7 +161,7 @@ export const Expiring = () => {
|
||||
button: 'Continue'
|
||||
});
|
||||
}}
|
||||
fontSize={SIZE.xs + 1}
|
||||
fontSize={SIZE.xs}
|
||||
height={30}
|
||||
style={{
|
||||
marginBottom: 10
|
||||
|
||||
@@ -50,7 +50,7 @@ export const Group = ({item, index}) => {
|
||||
style={{
|
||||
marginTop: 10
|
||||
}}
|
||||
size={SIZE.xs + 1}
|
||||
size={SIZE.xs}
|
||||
color={colors.icon}>
|
||||
{item.info}
|
||||
</Paragraph>
|
||||
|
||||
@@ -32,7 +32,7 @@ export const PricingItem = ({product, onPress, compact}) => {
|
||||
: 'Monthly'}
|
||||
</Heading>
|
||||
{product?.info && (
|
||||
<Paragraph size={SIZE.xs + 1}>{product.info}</Paragraph>
|
||||
<Paragraph size={SIZE.xs}>{product.info}</Paragraph>
|
||||
)}
|
||||
</View>
|
||||
)}
|
||||
|
||||
@@ -366,7 +366,7 @@ export const PricingPlans = ({
|
||||
{!user ? (
|
||||
<Paragraph
|
||||
color={colors.icon}
|
||||
size={SIZE.xs + 1}
|
||||
size={SIZE.xs}
|
||||
style={{
|
||||
alignSelf: 'center',
|
||||
textAlign: 'center',
|
||||
@@ -374,13 +374,13 @@ export const PricingPlans = ({
|
||||
}}>
|
||||
Upon signing up, your 14 day free trial of Notesnook Pro will be
|
||||
activated automatically.{' '}
|
||||
<Paragraph size={SIZE.xs + 1} style={{fontWeight: 'bold'}}>
|
||||
<Paragraph size={SIZE.xs} style={{fontWeight: 'bold'}}>
|
||||
No credit card information is required.
|
||||
</Paragraph>{' '}
|
||||
Once the free trial period ends, your account will be downgraded to
|
||||
basic free account.{' '}
|
||||
<Paragraph
|
||||
size={SIZE.xs + 1}
|
||||
size={SIZE.xs}
|
||||
onPress={() => {
|
||||
openLinkInBrowser('https://notesnook.com/#pricing', colors)
|
||||
.catch(e => {})
|
||||
@@ -401,7 +401,7 @@ export const PricingPlans = ({
|
||||
{Platform.OS === 'ios' ? (
|
||||
<Paragraph
|
||||
textBreakStrategy="balanced"
|
||||
size={SIZE.xs + 1}
|
||||
size={SIZE.xs}
|
||||
color={colors.icon}
|
||||
style={{
|
||||
alignSelf: 'center',
|
||||
@@ -414,7 +414,7 @@ export const PricingPlans = ({
|
||||
</Paragraph>
|
||||
) : (
|
||||
<Paragraph
|
||||
size={SIZE.xs + 1}
|
||||
size={SIZE.xs}
|
||||
color={colors.icon}
|
||||
style={{
|
||||
alignSelf: 'center',
|
||||
@@ -432,7 +432,7 @@ export const PricingPlans = ({
|
||||
width: '100%'
|
||||
}}>
|
||||
<Paragraph
|
||||
size={SIZE.xs + 1}
|
||||
size={SIZE.xs}
|
||||
color={colors.icon}
|
||||
style={{
|
||||
maxWidth: '100%',
|
||||
@@ -440,7 +440,7 @@ export const PricingPlans = ({
|
||||
}}>
|
||||
By subscribing, you agree to our{' '}
|
||||
<Paragraph
|
||||
size={SIZE.xs + 1}
|
||||
size={SIZE.xs}
|
||||
onPress={() => {
|
||||
openLinkInBrowser('https://notesnook.com/tos', colors)
|
||||
.catch(e => {})
|
||||
@@ -456,7 +456,7 @@ export const PricingPlans = ({
|
||||
</Paragraph>
|
||||
and{' '}
|
||||
<Paragraph
|
||||
size={SIZE.xs + 1}
|
||||
size={SIZE.xs}
|
||||
onPress={() => {
|
||||
openLinkInBrowser('https://notesnook.com/privacy', colors)
|
||||
.catch(e => {})
|
||||
|
||||
@@ -189,7 +189,7 @@ const PublishNoteDialog = () => {
|
||||
flexShrink: 1
|
||||
}}>
|
||||
<Heading size={SIZE.sm}>Published at:</Heading>
|
||||
<Paragraph size={SIZE.xs + 1} numberOfLines={1}>
|
||||
<Paragraph size={SIZE.xs} numberOfLines={1}>
|
||||
{publishUrl}
|
||||
</Paragraph>
|
||||
<Paragraph
|
||||
@@ -198,7 +198,7 @@ const PublishNoteDialog = () => {
|
||||
await openLinkInBrowser(publishUrl, colors.accent);
|
||||
} catch (e) {}
|
||||
}}
|
||||
size={SIZE.xs + 1}
|
||||
size={SIZE.xs}
|
||||
style={{
|
||||
marginTop: 5,
|
||||
color: colors.pri
|
||||
@@ -349,7 +349,7 @@ const PublishNoteDialog = () => {
|
||||
|
||||
<Paragraph
|
||||
color={colors.icon}
|
||||
size={SIZE.xs + 1}
|
||||
size={SIZE.xs}
|
||||
style={{
|
||||
textAlign: 'center',
|
||||
marginTop: 5,
|
||||
|
||||
@@ -66,7 +66,7 @@ export const ProFeatures = ({count = 6}) => {
|
||||
await sleep(300);
|
||||
eSendEvent(eOpenPremiumDialog);
|
||||
}}
|
||||
size={SIZE.xs + 2}
|
||||
size={SIZE.xs + 1}
|
||||
style={{
|
||||
textDecorationLine: 'underline',
|
||||
color: colors.icon
|
||||
|
||||
@@ -54,7 +54,7 @@ export const Card = ({color}) => {
|
||||
marginLeft: 10,
|
||||
maxWidth: '70%'
|
||||
}}>
|
||||
<Paragraph color={colors.icon} size={SIZE.xs + 1}>
|
||||
<Paragraph color={colors.icon} size={SIZE.xs}>
|
||||
{messageBoardState.message}
|
||||
</Paragraph>
|
||||
<Paragraph
|
||||
|
||||
@@ -48,7 +48,7 @@ export const NotebookHeader = ({notebook, onPress, onEditNotebook}) => {
|
||||
borderRadius: 10,
|
||||
paddingTop: 25
|
||||
}}>
|
||||
<Paragraph color={colors.icon} size={SIZE.xs + 1}>
|
||||
<Paragraph color={colors.icon} size={SIZE.xs}>
|
||||
{new Date(notebook.dateEdited).toLocaleString()}
|
||||
</Paragraph>
|
||||
<View
|
||||
@@ -101,7 +101,7 @@ export const NotebookHeader = ({notebook, onPress, onEditNotebook}) => {
|
||||
fontStyle: 'italic',
|
||||
fontFamily: null
|
||||
}}
|
||||
size={SIZE.xs + 1}
|
||||
size={SIZE.xs}
|
||||
color={colors.icon}>
|
||||
{notebook.topics.length === 1
|
||||
? '1 topic'
|
||||
|
||||
@@ -66,7 +66,7 @@ const TagItem = React.memo(
|
||||
</Heading>
|
||||
<Paragraph
|
||||
color={colors.icon}
|
||||
size={SIZE.xs + 1}
|
||||
size={SIZE.xs}
|
||||
style={{
|
||||
marginTop: 5
|
||||
}}>
|
||||
|
||||
@@ -62,8 +62,8 @@ export const normalize = (size) => {
|
||||
}
|
||||
};
|
||||
export const SIZE = {
|
||||
xxs: normalize(9) * scale.fontScale,
|
||||
xs: normalize(11) * scale.fontScale,
|
||||
xxs: normalize(10.5) * scale.fontScale,
|
||||
xs: normalize(12) * scale.fontScale,
|
||||
sm: normalize(14.5) * scale.fontScale,
|
||||
md: normalize(16) * scale.fontScale,
|
||||
lg: normalize(22) * scale.fontScale,
|
||||
@@ -73,8 +73,8 @@ export const SIZE = {
|
||||
};
|
||||
|
||||
export function updateSize() {
|
||||
SIZE.xxs = normalize(9) * scale.fontScale;
|
||||
SIZE.xs = normalize(11) * scale.fontScale;
|
||||
SIZE.xxs = normalize(10.5) * scale.fontScale;
|
||||
SIZE.xs = normalize(12) * scale.fontScale;
|
||||
SIZE.sm = normalize(14.5) * scale.fontScale;
|
||||
SIZE.md = normalize(16) * scale.fontScale;
|
||||
SIZE.lg = normalize(22) * scale.fontScale;
|
||||
|
||||
Reference in New Issue
Block a user