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

feat(factories): support functions #2790

Merged
merged 1 commit into from
May 11, 2018
Merged

Conversation

levithomason
Copy link
Member

@levithomason levithomason commented May 11, 2018

As part of the v2 manifesto, we are allowing users to construct the render tree shorthand props themselves. More details to come. This is now possible:

image

  <Button
    content='Nice!'
    icon={(Icon, props) => <Icon name='thumbs up' {...props} />}
  />

We simply give the user the component, props, and children of what ever the shorthand prop was going to render. This allows the user to control the render tree, previously not possible with shorthand props.

@codecov-io
Copy link

codecov-io commented May 11, 2018

Codecov Report

Merging #2790 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2790   +/-   ##
=======================================
  Coverage   99.74%   99.74%           
=======================================
  Files         160      160           
  Lines        2762     2762           
=======================================
  Hits         2755     2755           
  Misses          7        7

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8b52350...633e6d2. Read the comment docs.

@levithomason levithomason merged commit 6a22434 into master May 11, 2018
@levithomason levithomason deleted the feat/factory-function branch May 11, 2018 23:29
@levithomason
Copy link
Member Author

Released in semantic-ui-react@0.80.1.

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

Successfully merging this pull request may close these issues.

2 participants