Skip to content

Commit 29e9627

Browse files
committed
docs(rem): replace StyleSheet.configRem with configureRem
1 parent b13690c commit 29e9627

1 file changed

Lines changed: 20 additions & 13 deletions

File tree

src/pages/features/rem.astro

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
import Layout from "../../layouts/Layout.astro";
3-
import Header from "../../components/Header";
4-
import MainWrapper from "../../layouts/MainWrapper.astro";
5-
import Aside from "../../components/Aside.astro";
6-
import Content from "../../layouts/Content.astro";
2+
import Layout from '../../layouts/Layout.astro';
3+
import Header from '../../components/Header';
4+
import MainWrapper from '../../layouts/MainWrapper.astro';
5+
import Aside from '../../components/Aside.astro';
6+
import Content from '../../layouts/Content.astro';
77
import Code from '../../components/Code.astro';
88
import NavButton from '../../components/NavButton.astro';
9-
import Footer from "../../components/Footer";
9+
import Footer from '../../components/Footer';
1010
---
1111

1212
<Layout title="rem units | Fluffle">
@@ -18,8 +18,7 @@ import Footer from "../../components/Footer";
1818
<main>
1919
<Content title="rem units">
2020
<p>
21-
Fluffle supports <strong>rem units</strong> for scalable and consistent sizing
22-
across devices.
21+
Fluffle supports <strong>rem units</strong> for scalable and consistent sizing across devices.
2322
</p>
2423

2524
<h3>Basic usage</h3>
@@ -43,7 +42,8 @@ const styles = StyleSheet.create({
4342

4443
<h3>How it works</h3>
4544
<p>
46-
<code>1rem</code> is resolved from a root font size and automatically respects the user’s font scaling preferences.
45+
<code>1rem</code> is resolved from a root font size and automatically respects the user’s font
46+
scaling preferences.
4747
</p>
4848

4949
<ul>
@@ -52,14 +52,18 @@ const styles = StyleSheet.create({
5252
</ul>
5353

5454
<h3>Configuration</h3>
55-
<p>You can override the root font size by adding this to your app's initialization file (e.g. <code>App.tsx</code>):</p>
55+
<p>
56+
You can override the root font size by adding this to your app's initialization file (e.g. <code
57+
>App.tsx</code
58+
>):
59+
</p>
5660

5761
<Code
5862
lang="ts"
5963
code={`
60-
import { StyleSheet } from "@bibliolab/react-native-fluffle";
64+
import { configureRem } from "@bibliolab/react-native-fluffle";
6165
62-
StyleSheet.configRem.setRootFontSize(16);
66+
configureRem({ rootFontSize: 12 });
6367
`}
6468
/>
6569

@@ -71,7 +75,10 @@ StyleSheet.configRem.setRootFontSize(16);
7175

7276
<NavButton
7377
prev={{ title: 'Features | Nesting', href: '/features/nesting' }}
74-
next={{ title: 'Examples | Interactive card demo', href: '/examples/interactive-card-demo' }}
78+
next={{
79+
title: 'Examples | Interactive card demo',
80+
href: '/examples/interactive-card-demo',
81+
}}
7582
/>
7683
</Content>
7784
</main>

0 commit comments

Comments
 (0)