Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ UI kit использует следующие виды шрифтов.
| Тип шрифта | Используемые начертания | Рекомендуемый шрифт | Рекомендуемый аналог |
| ----------- | ---------------------------------------------- | ------------------- | -------------------- |
| `primary` | – regular<br/>– demibold<br/>– demibold italic | TT Fellows | Noto Sans |
| `secondary` | – regular<br/>– medium<br/>– bold | Noto Sans | — |
| `secondary` | – regular<br/>– bold | Noto Sans | — |

Исходники шрифтов не поставляются вместе с пакетом, их требуется подключать
отдельно. После подключения шрифтов в проект, необходимо указать их в
Expand Down Expand Up @@ -87,7 +87,6 @@ UI kit использует следующие виды шрифтов.
fontFamily: 'Noto Sans',
fontDefinitions: [
{ path: './assets/NotoSans-Bold.ttf', weight: 700 },
{ path: './assets/NotoSans-Medium.ttf', weight: 500 },
{ path: './assets/NotoSans-Regular.ttf', weight: 400 },
],
},
Expand All @@ -108,7 +107,6 @@ UI kit использует следующие виды шрифтов.
<!-- xml_noto_sans.xml -->
<font-family xmlns:app="http://schemas.android.com/apk/res-auto">
<font app:font="@font/noto_sans_bold" app:fontStyle="normal" app:fontWeight="700"/>
<font app:font="@font/noto_sans_medium" app:fontStyle="normal" app:fontWeight="500"/>
<font app:font="@font/noto_sans_regular" app:fontStyle="normal" app:fontWeight="400"/>
</font-family>
```
Expand Down Expand Up @@ -158,7 +156,6 @@ UI kit использует следующие виды шрифтов.
<string>TTFellows-DemiBoldItalic.ttf</string>
<string>TTFellows-Regular.ttf</string>
<string>NotoSans-Regular.ttf</string>
<string>NotoSans-Medium.ttf</string>
<string>NotoSans-Bold.ttf</string>
</array>
```
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion src/components/Typography/Anchor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,11 @@ const styles = StyleSheet.create(({ spacing, typography, fonts }) => ({
letterSpacing: -0.25,
},
underlined: { textDecorationLine: 'underline' },
base: { lineHeight: 18, letterSpacing: 0 },
base: {
fontSize: typography.Size['text-base'],
lineHeight: undefined,
letterSpacing: 0,
},
visited: { color: typography.Color.Service['text-help'] },
icon: {
width: typography.Size['text-base'],
Expand Down
6 changes: 2 additions & 4 deletions src/components/Typography/Body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface BodyProps extends TextProps {
readonly color?: 'default' | 'secondary' | 'primary'
readonly disabled?: boolean
readonly paragraph?: boolean
readonly weight?: 'regular' | 'medium' | 'bold'
readonly weight?: 'regular' | 'bold'
}

export const Body = ({
Expand Down Expand Up @@ -43,11 +43,9 @@ const styles = StyleSheet.create(({ theme, typography, fonts }) => ({
verticalAlign: 'middle',
fontFamily: fonts.secondary,
lineHeight: 20,
letterSpacing: -0.5,
},
regular: { fontWeight: 400 },
medium: { fontWeight: 500 },
bold: { fontWeight: 700 },
bold: { fontWeight: 700, letterSpacing: -0.5 },
default: { color: theme.General.textColor },
primary: { color: theme.General.primaryColor },
secondary: { color: theme.General.textSecondaryColor },
Expand Down
2 changes: 1 addition & 1 deletion src/components/Typography/Service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const styles = StyleSheet.create(({ typography, spacing, fonts }) => ({
lineHeight: 15,
letterSpacing: -0.25,
},
textBase: { lineHeight: 18 },
textBase: { lineHeight: undefined, fontSize: typography.Size['text-base'] },

warning: { color: typography.Color.Service['text-warning'] },
success: { color: typography.Color.Service['text-success'] },
Expand Down
2 changes: 1 addition & 1 deletion src/components/Typography/__tests__/Body.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('Body component tests', () => {
color: ['default', 'secondary', 'primary'],
disabled: [true, false],
paragraph: [true, false],
weight: ['regular', 'medium', 'bold'],
weight: ['regular', 'bold'],
})

test.each(snapshotCases)(
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading