Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wootsbot committed Dec 1, 2023
1 parent 62c9936 commit 8a963dd
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,11 @@ And returns an array with the following:

The `createBlocks` function receives a configuration object:

- theme: receives the tokens generated by `createTokens`.
- themes: or it can receive an object with multiple themes generated by `createTokens`.

And returns all the available functions:

- block: Facilitates creating styled React-Native components.
- theme: The `theme` object is passed to the `ThemeProvider`, easing style management and accessibility.
- themes: The `themes` object is passed to the `ThemeProvider`, allowing the use of multiple themes.
- utils: Create custom utils to improve your developer experience.
- css: Facilitates string interpolation for writing CSS in a readable manner.
Expand Down Expand Up @@ -115,8 +113,10 @@ const [themeTokens] = createTokens({
},
});

export const { block, css, theme, themes } = createBlocks({
theme: themeTokens,
export const { block, css, themes } = createBlocks({
themes: {
light: themeTokens,
},
});
```

Expand All @@ -129,15 +129,14 @@ From this point onwards, you'll be importing block and other functions from bloc

import React from "react";

import RootNavigator from "./RootNavigation";

import { ThemeProvider } from "@design-blocks/native";

import { theme } from "./blocks.config";
import RootNavigator from "./RootNavigation";
import { themes } from "./blocks.config";

const App = () => {
return (
<ThemeProvider theme={theme}>
<ThemeProvider theme={themes.light}>
<RootNavigator />
</ThemeProvider>
);
Expand Down

0 comments on commit 8a963dd

Please sign in to comment.