Skip to content

Commit

Permalink
design: Update typography styles in design system (#93)
Browse files Browse the repository at this point in the history
* design: Update typography system with new font settings

* design: Update text system and padding values following typography changes

* design: Update height in link card
  • Loading branch information
Taegon21 authored Oct 6, 2024
1 parent d50d5c7 commit 702eec5
Show file tree
Hide file tree
Showing 19 changed files with 50 additions and 35 deletions.
4 changes: 2 additions & 2 deletions src/components/common/NavigationButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ const NavigationButton = ({
{label === t('이전 링크') ? (
<>
<IconComponent width={14} height={14} fill={iconColor} />
<Text style={[FONTS.CAPTION_REGULAR, {color: textColor}]}>
<Text style={[FONTS.BODY3_MEDIUM, {color: textColor}]}>
{t(label)}
</Text>
</>
) : (
<>
<Text style={[FONTS.CAPTION_REGULAR, {color: textColor}]}>
<Text style={[FONTS.BODY3_MEDIUM, {color: textColor}]}>
{t(label)}
</Text>
<IconComponent width={14} height={14} fill={iconColor} />
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/TextInputGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const createStyles = (theme: ITheme) =>
paddingVertical: 16,
width: '100%',
color: theme.TEXT800,
...FONTS.BODY1_MEDIUM,
...FONTS.BODY3_MEDIUM,
},
inputFieldTop: {
width: '100%',
Expand Down
2 changes: 1 addition & 1 deletion src/components/folder/FolderButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ const createStyles = (theme: ITheme) =>
},
recentText: {
color: theme.MAIN500,
...FONTS.CAPTION_MEDIUM,
...FONTS.BODY3_MEDIUM,
},
});

Expand Down
4 changes: 2 additions & 2 deletions src/components/home/LargeCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ const createStyles = (theme: ITheme) =>
StyleSheet.create({
container: {
width: screenWidth,
paddingVertical: 16,
paddingVertical: 20,
},
cardImageContainer: {
width: screenWidth,
Expand Down Expand Up @@ -309,7 +309,7 @@ const createStyles = (theme: ITheme) =>
},
folderText: {
color: theme.TEXT600,
...FONTS.BODY2_REGULAR,
...FONTS.BODY3_MEDIUM,
},
titleText: {
color: theme.TEXT900,
Expand Down
8 changes: 4 additions & 4 deletions src/components/home/LargeCardPlaceHolder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ export default LargeCardPlaceHolder;

const styles = StyleSheet.create({
topContainer: {
height: 271,
height: 272,
},
container: {
marginTop: 16,
marginTop: 20,
},
threeDots: {
position: 'absolute',
top: 28,
right: 12,
top: 34,
right: 12.67,
height: 16.67,
flexDirection: 'column',
justifyContent: 'space-between',
Expand Down
5 changes: 3 additions & 2 deletions src/components/home/SmallCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,9 @@ const createStyles = (theme: ITheme) =>
StyleSheet.create({
container: {
height: 180,
paddingVertical: 16,
paddingVertical: 20,
gap: 8,

},
dotPosition: {
flexDirection: 'row',
Expand Down Expand Up @@ -446,7 +447,7 @@ const createStyles = (theme: ITheme) =>
},
folderText: {
color: theme.TEXT600,
...FONTS.BODY2_REGULAR,
...FONTS.BODY3_MEDIUM,
},
titleText: {
color: theme.TEXT900,
Expand Down
4 changes: 2 additions & 2 deletions src/components/home/SmallCardPlaceHolder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const SmallCardPlaceHolder = () => {
highlightColor={theme.TEXT100}>
<View style={styles.container}>
<View style={styles.header}>
<View style={{width: 42, height: 24}} />
<View style={{width: 42, height: 20}} />
<View style={styles.threeDots}>
<View style={{width: 3.33, height: 3.33, borderRadius: 2}} />
<View style={{width: 3.33, height: 3.33, borderRadius: 2}} />
Expand Down Expand Up @@ -47,12 +47,12 @@ export default SmallCardPlaceHolder;
const styles = StyleSheet.create({
topContainer: {
height: 180,
paddingVertical: 20,
},
container: {
gap: 8,
},
header: {
paddingTop: 16,
flexDirection: 'row',
justifyContent: 'space-between',
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/home/UnAuthLargeCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ const createStyles = (theme: ITheme) =>
},
folderText: {
color: theme.TEXT600,
...FONTS.BODY2_REGULAR,
...FONTS.BODY3_MEDIUM,
},
titleText: {
color: theme.TEXT900,
Expand Down
2 changes: 1 addition & 1 deletion src/components/home/UnAuthSmallCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ const createStyles = (theme: ITheme) =>
},
folderText: {
color: theme.TEXT600,
...FONTS.BODY2_REGULAR,
...FONTS.BODY3_MEDIUM,
},
titleText: {
color: theme.TEXT900,
Expand Down
2 changes: 1 addition & 1 deletion src/components/mypage/DeletedTrueContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const createStyles = (theme: ITheme) =>
gap: 4,
},
bodyText: {
...FONTS.CAPTION_REGULAR,
...FONTS.BODY3_MEDIUM,
color: theme.TEXT500,
},
headerText: {
Expand Down
5 changes: 3 additions & 2 deletions src/components/search/ResentSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,11 @@ const createStyles = (theme: ITheme) =>
},
headerText: {
paddingHorizontal: 18,
marginVertical: 10,
marginTop: 6,
marginBottom: 10,
},
headerTitle: {
...FONTS.BODY1_MEDIUM,
...FONTS.BODY2_MEDIUM,
color: theme.TEXT900,
},
separator: {
Expand Down
6 changes: 3 additions & 3 deletions src/components/search/SearchHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const SearchHeader = memo(
};

return (
// <View style={styles.searchContainer, {backgroundColor: theme.THEME_NUMBER === 3 ? theme.MAIN200 : theme.BACKGROUND}}>
<View
style={[
styles.searchContainer,
Expand Down Expand Up @@ -67,17 +66,18 @@ const createStyles = (theme: ITheme) =>
paddingHorizontal: 18,
flexDirection: 'row',
alignItems: 'center',
overflow: 'hidden',
justifyContent: 'center',
},
searchInput: {
flex: 1,
height: 50,
borderRadius: 8,
paddingLeft: 16,
paddingRight: 46,
paddingVertical: 5,
color: theme.TEXT800,
backgroundColor: theme.TEXT200,
...FONTS.BODY2_MEDIUM,
...FONTS.BODY1_MEDIUM,
},
searchIcon: {
position: 'absolute',
Expand Down
24 changes: 18 additions & 6 deletions src/constants/fonts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
fontFamily: 'Pretendard-SemiBold',
fontSize: 26,
lineHeight: 39,
letterSpacing: 0,
letterSpacing: -0.2,
},
SUBTITLE: {
fontFamily: 'Pretendard-SemiBold',
Expand All @@ -21,7 +21,7 @@ export default {
fontFamily: 'Pretendard-Medium',
fontSize: 18,
lineHeight: 27,
letterSpacing: -0.4,
letterSpacing: -0.2,
},
BODY2_SEMIBOLD: {
fontFamily: 'Pretendard-SemiBold',
Expand All @@ -41,16 +41,28 @@ export default {
lineHeight: 24,
letterSpacing: -0.2,
},
CAPTION_MEDIUM: {
BODY3_SEMIBOLD: {
fontFamily: 'Pretendard-SemiBold',
fontSize: 14,
lineHeight: 21,
letterSpacing: -0.2,
},
BODY3_MEDIUM: {
fontFamily: 'Pretendard-Medium',
fontSize: 14,
lineHeight: 21,
letterSpacing: 0,
letterSpacing: -0.2,
},
CAPTION_REGULAR: {
BODY3_REGULAR: {
fontFamily: 'Pretendard-Regular',
fontSize: 14,
lineHeight: 21,
letterSpacing: 0,
letterSpacing: -0.2,
},
CAPTION_REGULAR: {
fontFamily: 'Pretendard-Regular',
fontSize: 12,
lineHeight: 18,
letterSpacing: -0.2,
},
};
2 changes: 1 addition & 1 deletion src/screens/stack-screens/BookmarkWebView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ const BookmarkWebView = () => {
<ArrowBackIcon fill={theme.TEXT900} />
</TouchableOpacity>
<View style={styles.urlTextHolder}>
<Text style={[FONTS.BODY2_REGULAR, {color: theme.TEXT700}]}>
<Text style={[FONTS.BODY3_MEDIUM, {color: theme.TEXT700}]}>
{extractHostname(currentUrl ?? '')}
</Text>
</View>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/stack-screens/Onboarding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,6 @@ const styles = StyleSheet.create({
textAlign: 'center',
textDecorationLine: 'underline',
paddingVertical: 10,
...FONTS.CAPTION_MEDIUM,
...FONTS.BODY3_MEDIUM,
},
});
2 changes: 1 addition & 1 deletion src/screens/stack-screens/SearchWebView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ const SearchWebView = () => {
<ArrowBackIcon fill={theme.TEXT900} />
</TouchableOpacity>
<View style={styles.urlTextHolder}>
<Text style={[FONTS.BODY2_REGULAR, {color: theme.TEXT700}]}>
<Text style={[FONTS.BODY3_MEDIUM, {color: theme.TEXT700}]}>
{extractHostname(currentUrl ?? '')}
</Text>
</View>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/stack-screens/WebViewList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ const WebViewList = () => {
<ArrowBackIcon fill={theme.TEXT900} />
</TouchableOpacity>
<View style={styles.urlTextHolder}>
<Text style={[FONTS.BODY2_REGULAR, {color: theme.TEXT700}]}>
<Text style={[FONTS.BODY3_MEDIUM, {color: theme.TEXT700}]}>
{extractHostname(currentUrl ?? '')}
</Text>
</View>
Expand Down
5 changes: 3 additions & 2 deletions src/screens/tab-screens/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,11 @@ const createStyles = (theme: ITheme) =>
backgroundColor: theme.TEXT200,
},
headerText: {
marginVertical: 10,
marginTop: 6,
marginBottom: 10,
},
headerTextContent: {
...FONTS.BODY1_MEDIUM,
...FONTS.BODY2_MEDIUM,
color: theme.TEXT900,
},
});
2 changes: 1 addition & 1 deletion src/screens/unauth-screen/UnAuthWebView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const UnAuthWebView = () => {
<ArrowBackIcon fill={theme.TEXT900} />
</TouchableOpacity>
<View style={styles.urlTextHolder}>
<Text style={[FONTS.BODY2_REGULAR, {color: theme.TEXT700}]}>
<Text style={[FONTS.BODY3_MEDIUM, {color: theme.TEXT700}]}>
{extractHostname(currentUrl ?? '')}
</Text>
</View>
Expand Down

0 comments on commit 702eec5

Please sign in to comment.