Skip to content

Commit f53b23d

Browse files
committed
FEAT: font face updates
1 parent db9b0b1 commit f53b23d

19 files changed

+9946
-4283
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Breaking
66

7+
- lots of breaking changes with fonts
78
- `FontFamily` is now `FontFace`
89
- `createFontFamily` is now `createFontFace`
910

example/App.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, {useState} from "react";
2-
import {important, media, StyledText, ThemeFor, ThemeProvider, useComposedValues, vw, ExpoFontBackend, setFontBackendForNative} from "style-composer";
2+
import {important, media, StyledText, ThemeFor, ThemeProvider, useComposedValues, vw, ExpoFontBackend, setFontBackendForNative, StyledView} from "style-composer";
33
import {CheckBox, ScrollView} from "react-native";
44
import * as Fonts from "expo-font";
55

@@ -45,6 +45,7 @@ const App = React.memo((props: AppInternalProps) => {
4545

4646
const themedDynamic = useComposedValues(() => ({
4747
color: important(THEMING.textColor()),
48+
size: vw(50),
4849
}), []);
4950

5051
return (
@@ -60,12 +61,15 @@ const App = React.memo((props: AppInternalProps) => {
6061
</Card>)}
6162
</ScrollView>
6263
<Card classes={$ChildSelectorTest}>
63-
<Text style={[{fontSize: 8}, themedDynamic]}>asda</Text>
64+
<Text style={[{fontSize: 8, color: themedDynamic.color}]}>asda</Text>
6465
</Card>
6566
<Button title={"hi"} disabled={true} style={{backgroundColor: "yellow"}} classes={[$BigMargin]} onPress={() => {
6667
console.log("hi");
6768
}}/>
6869
<Text>Open up App.tsx to start working on your app!</Text>
70+
<StyledView style={{width: themedDynamic.size, backgroundColor: "purple"}}>
71+
<Text>hello</Text>
72+
</StyledView>
6973
</Container>
7074
</ThemeProvider>
7175
);

0 commit comments

Comments
 (0)