Skip to content

Commit b4a981e

Browse files
committed
chore(docs): updated documentation
1 parent 659a07c commit b4a981e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,42 @@
44
55
Provides a way to styling components in React Native with better experience and composability. The key feature is the ability to create multi-variants styles with a type-safe definition inspired by [Stitches](https://stitches.dev/docs/variants) and [CVA](https://cva.style/docs/getting-started/variants) (for React apps).
66

7-
#### Currently properties:
7+
#### Available properties:
88

99
- `base`: The base styles for the element.
1010
- `variants`: The different visual styles for the element.
1111
- `compoundVariants`: Styles that apply when multiple other variant conditions are met.
12-
- `default`: Set a variant by default.
12+
- `defaultVariants`: Set a variant by default when no variant is provided.
1313

1414
#### Roadmap
1515

1616
- [x] Variants definition.
1717
- [x] Default variants.
1818
- [x] Support to define design tokens.
19-
- [ ] Styles based on conditions.
2019
- [ ] Default design tokens.
2120

2221
### Create your config file
23-
To configure `Jacaranda`, create a `jacaranda.config.ts` file (`.js` works too) to define your reusable design tokens and import the `createTokens` function.
22+
To configure `Jacaranda`, create a `jacaranda.config.ts` file (`.js` works too) to define your reusable design tokens and import the `defineTokens` function.
23+
2424
```tsx
2525
// jacaranda.config.ts
26-
import { createTokens } from 'jacaranda';
26+
import { defineTokens } from 'jacaranda';
2727
```
2828

2929
This function receives an object with the design tokens.
30-
- `colors`: Define your colors.
31-
- `fontSize`: Define your font sizes.
32-
- `spacing`: Define your spacing.
30+
- `colors`: Define your colors design tokens.
31+
- `space`: Define your spacing.
3332
- `fonts`: Define your fonts.
33+
- `fontSize`: Define your font sizes.
3434
- `lineHeight`: Define your line heights.
3535

3636
And returns a `styles` function that you can use to style your components.
3737

3838
```tsx
3939
// jacaranda.config.ts
40-
import { createTokens } from 'jacaranda';
40+
import { defineTokens } from 'jacaranda';
4141

42-
export const { styles } = createTokens({
42+
export const { styles } = defineTokens({
4343
colors: {
4444
primary50: '#ecfeff',
4545
primary100: '#cffafe',
@@ -109,7 +109,7 @@ const buttonStyles = styles({
109109
lg: { paddingHorizontal: 16, paddingVertical: 10 },
110110
},
111111
},
112-
default: {
112+
defaultVariants: {
113113
intent: 'primary',
114114
size: 'md',
115115
},

0 commit comments

Comments
 (0)