Skip to content

Commit

Permalink
fix(docs): change createRestyleFunction to createRestyleComponent (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan-dutoit authored Jul 21, 2020
1 parent b0992e6 commit b7d40d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,14 +375,14 @@ The Restyle library comes with a number of predefined Restyle functions for your
To define your own Restyle function, use the `createRestyleFunction` helper:

```ts
import {createRestyleFunction, createRestyleFunction} from '@shopify/restyle'
import {createRestyleFunction, createRestyleComponent} from '@shopify/restyle'
const transparency = createRestyleFunction({
property: 'transparency',
styleProperty: 'opacity',
transform: ({value}: {value: number}) => 1 - value,
});

const TransparentComponent = createRestyleFunction([transparency])
const TransparentComponent = createRestyleComponent([transparency])

<TransparentComponent transparency={0.5} />
```
Expand Down

0 comments on commit b7d40d4

Please sign in to comment.