Skip to content

feat(Uncontrolled): add various uncontrolled components#307

Merged
eddywashere merged 3 commits intoreactstrap:masterfrom
TheSharpieOne:feature/uncontrolled
Jan 28, 2017
Merged

feat(Uncontrolled): add various uncontrolled components#307
eddywashere merged 3 commits intoreactstrap:masterfrom
TheSharpieOne:feature/uncontrolled

Conversation

@TheSharpieOne
Copy link
Copy Markdown
Member

Alert (dismissible), ButtonDropdown, Dropdown, NavDropdown, and Tooltip now have uncontrolled counterparts UncontrolledAlert, UncontrolledButtonDropdown, UncontrolledDropdown, UncontrolledNavDropdown, and UncontrolledTooltip respectfully.
These uncontrolled components can be used without the user/developer needing to control the state. They will manage their own state of when to show/hide based on the common use-case. The original components are still there for the more advanced use and non-common use-cases.
The goal of these new components is to make it easier for out-of-the-box development.

Documentation for the various components have been added to the end of each of their respective pages.

Comment thread src/Uncontrolled.js Outdated
}
}

SimpleComponent.displayName = key;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@eddywashere
Copy link
Copy Markdown
Member

Thanks! It kind of highlights the api differences between the components added and ones that could be added, Popover & Modal. I don't think it would be practical to have Tooltip require onMouseEnter, onMouseLeave + using toggle and isOpen on the target component. Maybe Tooltip could have a prop to enable current auto hover events and Popover could have a similar prop to enable auto hover handlers. I'll create an issue to track/discuss it. Thanks again!

@eddywashere eddywashere merged commit 2f648c1 into reactstrap:master Jan 28, 2017
This was referenced Jan 28, 2017
@TheSharpieOne TheSharpieOne deleted the feature/uncontrolled branch January 31, 2017 15:34
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