mirror of
https://github.com/zhigang1992/nativewind.git
synced 2026-06-12 08:58:20 +08:00
docs: Add font family docs
This commit is contained in:
46
apps/website/docs/tailwind/typography/font-family.md
Normal file
46
apps/website/docs/tailwind/typography/font-family.md
Normal file
@@ -0,0 +1,46 @@
|
||||
import Compatibility from "../\_compatibility.mdx"
|
||||
import Usage from "../\_usage.mdx"
|
||||
|
||||
# Font Family
|
||||
|
||||
## Usage
|
||||
|
||||
<Usage />
|
||||
|
||||
### Differences on Native
|
||||
|
||||
React Native does not support fallback fonts. If an array of fonts are provided, NativeWind will only use the first font.
|
||||
|
||||
### Adding fonts to your theme
|
||||
|
||||
:::info
|
||||
|
||||
NativeWind will not load/link fonts into your app. If you have any issues with a font family/weights not rendering, please first verify it works with inline styles.
|
||||
|
||||
:::
|
||||
|
||||
```tsx
|
||||
module.exports = {
|
||||
theme: {
|
||||
extend: {
|
||||
fontFamily: {
|
||||
example: ["ExampleFontFamily"],
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
## Compatibility
|
||||
|
||||
<Compatibility
|
||||
supported={[
|
||||
"font-[n]",
|
||||
"font-{n}",
|
||||
]}
|
||||
none={[
|
||||
"font-sans",
|
||||
"font-serif",
|
||||
"font-mono",
|
||||
]}
|
||||
/>
|
||||
@@ -162,6 +162,7 @@ const sidebars = {
|
||||
label: "Typography",
|
||||
collapsed: false,
|
||||
items: [
|
||||
"tailwind/typography/font-family",
|
||||
"tailwind/typography/font-size",
|
||||
"tailwind/typography/font-style",
|
||||
"tailwind/typography/font-weight",
|
||||
|
||||
18
package-lock.json
generated
18
package-lock.json
generated
@@ -40,7 +40,7 @@
|
||||
"expo": "46.0.2",
|
||||
"jest": "28.1.3",
|
||||
"native-base": "3.4.11",
|
||||
"nativewind": "2.0.0-next.55",
|
||||
"nativewind": "2.0.0-next.56",
|
||||
"react": "*",
|
||||
"react-dom": "*",
|
||||
"react-native": "0.69.3",
|
||||
@@ -64,7 +64,7 @@
|
||||
"@babel/preset-react": "^7.18.6",
|
||||
"@babel/standalone": "7.18.11",
|
||||
"@swc/plugin-transform-imports": "1.1.0",
|
||||
"nativewind": "2.0.0-next.55",
|
||||
"nativewind": "2.0.0-next.56",
|
||||
"tailwindcss": "3.1.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -76,7 +76,7 @@
|
||||
"dependencies": {
|
||||
"expo": "46.0.2",
|
||||
"expo-status-bar": "1.4.0",
|
||||
"nativewind": "2.0.0-next.55",
|
||||
"nativewind": "2.0.0-next.56",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"react-native": "0.69.3",
|
||||
@@ -104,7 +104,7 @@
|
||||
"dedent": "^0.7.0",
|
||||
"docusaurus-plugin-sass": "^0.2.2",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"nativewind": "2.0.0-next.55",
|
||||
"nativewind": "2.0.0-next.56",
|
||||
"prism-react-renderer": "1.3.3",
|
||||
"react": "18.2.0",
|
||||
"react-chartjs-2": "4.3.1",
|
||||
@@ -30695,7 +30695,7 @@
|
||||
}
|
||||
},
|
||||
"packages/nativewind": {
|
||||
"version": "2.0.0-next.55",
|
||||
"version": "2.0.0-next.56",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/generator": "^7.18.7",
|
||||
@@ -39257,7 +39257,7 @@
|
||||
"expo": "46.0.2",
|
||||
"jest": "28.1.3",
|
||||
"native-base": "3.4.11",
|
||||
"nativewind": "2.0.0-next.55",
|
||||
"nativewind": "2.0.0-next.56",
|
||||
"patch-package": "^6.4.7",
|
||||
"react": "*",
|
||||
"react-dom": "*",
|
||||
@@ -40861,7 +40861,7 @@
|
||||
"@babel/preset-react": "^7.18.6",
|
||||
"@babel/standalone": "7.18.11",
|
||||
"@swc/plugin-transform-imports": "1.1.0",
|
||||
"nativewind": "2.0.0-next.55",
|
||||
"nativewind": "2.0.0-next.56",
|
||||
"tailwindcss": "3.1.7",
|
||||
"vercel": "27.3.7"
|
||||
}
|
||||
@@ -41592,7 +41592,7 @@
|
||||
"@babel/core": "7.18.10",
|
||||
"expo": "46.0.2",
|
||||
"expo-status-bar": "1.4.0",
|
||||
"nativewind": "2.0.0-next.55",
|
||||
"nativewind": "2.0.0-next.56",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"react-native": "0.69.3",
|
||||
@@ -50641,7 +50641,7 @@
|
||||
"dedent": "^0.7.0",
|
||||
"docusaurus-plugin-sass": "^0.2.2",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"nativewind": "2.0.0-next.55",
|
||||
"nativewind": "2.0.0-next.56",
|
||||
"prism-react-renderer": "1.3.3",
|
||||
"react": "18.2.0",
|
||||
"react-chartjs-2": "4.3.1",
|
||||
|
||||
Reference in New Issue
Block a user