File tree Expand file tree Collapse file tree 2 files changed +33
-12
lines changed
packages/HorizonUI/Sources/HorizonUI/Sources/Foundation/Typography Expand file tree Collapse file tree 2 files changed +33
-12
lines changed Original file line number Diff line number Diff line change @@ -24,20 +24,21 @@ public extension HorizonUI.Typography {
24
24
private let text = " This is an example text. "
25
25
26
26
public var body : some View {
27
- VStack ( spacing: 16 ) {
28
- ForEach ( HorizonUI . Typography. Name. allCases) { typography in
29
- VStack ( alignment: . leading, spacing: 4 ) {
30
- Text ( " \( typography) " )
31
- . font ( typography. font)
32
- HorizonUI . Typography (
33
- text: text,
34
- name: typography. id,
35
- color: . black
36
- )
27
+ ScrollView ( showsIndicators: false ) {
28
+ VStack ( spacing: 16 ) {
29
+ ForEach ( HorizonUI . Typography. Name. allCases) { typography in
30
+ VStack ( alignment: . leading, spacing: 4 ) {
31
+ Text ( " \( typography) " )
32
+ . font ( typography. font)
33
+ HorizonUI . Typography (
34
+ text: text,
35
+ name: typography. id,
36
+ color: . black
37
+ )
38
+ }
39
+ . frame ( maxWidth: . infinity, alignment: . leading)
37
40
}
38
- . frame ( maxWidth: . infinity, alignment: . leading)
39
41
}
40
- Spacer ( )
41
42
}
42
43
. padding ( . all, 16 )
43
44
. navigationTitle ( " Typography " )
Original file line number Diff line number Diff line change @@ -24,12 +24,32 @@ public extension HorizonUI {
24
24
case h1
25
25
case h2
26
26
case h3
27
+ case p1
28
+ case p2
29
+ case p3
30
+ case tag
31
+ case labelLargeBold
32
+ case labelMediumBold
33
+ case labelSmallBold
34
+ case labelSmall
35
+ case buttonTextLarge
36
+ case buttonTextMedium
27
37
28
38
var font : Font {
29
39
switch self {
30
40
case . h1: return . huiFonts. manropeBold28
31
41
case . h2: return . huiFonts. manropeBold24
32
42
case . h3: return . huiFonts. manropeBold20
43
+ case . p1: return . huiFonts. figtreeRegular16
44
+ case . p2: return . huiFonts. figtreeRegular14
45
+ case . p3: return . huiFonts. figtreeRegular12
46
+ case . tag: return . huiFonts. manropeRegular12
47
+ case . labelLargeBold: return . huiFonts. figtreeSemibold16
48
+ case . labelMediumBold: return . huiFonts. figtreeSemibolt14
49
+ case . labelSmallBold: return . huiFonts. figtreeSemibold12
50
+ case . labelSmall: return . huiFonts. figtreeRegular12
51
+ case . buttonTextLarge: return . huiFonts. figtreeRegular16
52
+ case . buttonTextMedium: return . huiFonts. figtreeRegular14
33
53
}
34
54
}
35
55
}
You can’t perform that action at this time.
0 commit comments