Created
September 21, 2017 20:30
-
-
Save pnispel/2a0ac8fa179bbcea928beee4a59d5a97 to your computer and use it in GitHub Desktop.
Dropdowns after init
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import JQueryTypeDropdown from './JQueryTypeDropdown.jsx' | |
import FoundationTypeDropdown from './FoundationTypeDropdown.jsx' | |
const App = () => { | |
return ( | |
<div> | |
<JQueryTypeDropdown /> | |
<FoundationTypeDropdown /> | |
</div> | |
); | |
} | |
export default App |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class FoundationTypeDropdown extends React.component { | |
componentDidMount() { | |
$(document).foundation('dropdown', 'reflow') | |
// or maybe $(document).foundation() | |
} | |
render() { | |
return ( | |
<div class="some-foundation-dropdown-class" /> | |
) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class JQueryTypeDropdown extends React.component { | |
componentDidMount() { | |
$.someDropdownPlugin(this.dropdownEl) | |
} | |
render() { | |
return ( | |
<div ref={(el) => this.dropdownEl = el} /> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment