Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

passThrough prop for <Can> component #105

Closed
2 tasks done
stalniy opened this issue Aug 23, 2018 · 2 comments
Closed
2 tasks done

passThrough prop for <Can> component #105

stalniy opened this issue Aug 23, 2018 · 2 comments

Comments

@stalniy
Copy link
Owner

stalniy commented Aug 23, 2018

<Can> with that option always renders own children. It may be useful for cases when you want disable buttons and not hide them completely

<Can I="read" a="Post" passThrough>
  (can) => <button disabled={!can}>My button</button>
</Can>

The similar functionality can be implemetned for Vue <can> component by using scoped slot

  • react
  • vue
@stalniy
Copy link
Owner Author

stalniy commented Sep 3, 2018

Published in @casl/[email protected]

@stalniy
Copy link
Owner Author

stalniy commented Nov 25, 2018

Published in @casl/[email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant