import { window } from 'global'; import PropTypes from 'prop-types'; import React, { Component } from 'react'; import Nav from '../Nav'; import NavDropdown from '../Nav/dropdown'; import Content from '../Content'; import './style.css'; const getEditUrl = (selectedSectionId, selectedItemId) => { const gitHubRepoUrl = 'https://github.com/storybooks/storybook'; const docPath = `${selectedSectionId}/${selectedItemId}`; return `${gitHubRepoUrl}/blob/master/docs/src/pages/${docPath}/index.md`; }; class Search extends Component { componentDidMount() { window.docsearch({ apiKey: 'a4f7f972f1d8f99a66e237e7fd2e489f', indexName: 'storybook-js', inputSelector: '#search', debug: false, }); } render() { return (
); } } const Container = ({ sections, selectedItem, selectedSectionId, selectedItemId }) => (
); Container.propTypes = { sections: PropTypes.array, // eslint-disable-line selectedItem: PropTypes.object, // eslint-disable-line selectedSectionId: PropTypes.string.isRequired, selectedItemId: PropTypes.string.isRequired, }; export { Container as default };