Skip to content

Commit

Permalink
docs(react:readme): updates examples with render children prop
Browse files Browse the repository at this point in the history
  • Loading branch information
stalniy committed Aug 31, 2018
1 parent 3db66ae commit 4c5c690
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/casl-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This component accepts children and 4 properties (see [Property names and aliase

```jsx
<Can I="create" a="Post" ability={ability}>
() => <button onClick={this.createPost.bind(this)}>Create Post</button>
{() => <button onClick={this.createPost.bind(this)}>Create Post</button>}
</Can>
```

Expand Down Expand Up @@ -62,7 +62,7 @@ import Can from './Can'
export function button() {
return (
<Can I="create" a="Post">
() => <button onClick={this.createPost.bind(this)}>Create Post</button>
{() => <button onClick={this.createPost.bind(this)}>Create Post</button>}
</Can>
)
}
Expand Down Expand Up @@ -108,7 +108,7 @@ export class TodoApp extends Component {
render() {
return (
<Can I="create" a="Todo">
() => <button onClick={this.createTodo.bind(this)}>Create Todo</button>
{() => <button onClick={this.createTodo.bind(this)}>Create Todo</button>}
</Can>
)
}
Expand Down Expand Up @@ -180,7 +180,7 @@ For example, the code below reads as `Can I create a Post`.

```jsx
<Can I="create" a="Post">
() => <button onClick={...}>Create Post</button>
{() => <button onClick={...}>Create Post</button>}
</Can>
```

Expand Down

0 comments on commit 4c5c690

Please sign in to comment.