0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-01 02:41:39 -05:00

Created standalone search component

This commit is contained in:
Sanne de Vries 2022-07-05 10:49:11 +02:00
parent 27e5cde85a
commit bca286632f

View file

@ -76,26 +76,30 @@ class PopupContent extends React.Component {
}
render() {
const pageStyle = {};
let popupWidthStyle = '';
let pageClass = 'search';
let className = 'gh-portal-popup-container';
const containerClassName = `${className} ${popupWidthStyle} ${pageClass}`;
return (
<>
<div className={'gh-portal-popup-wrapper ' + pageClass} onClick={e => this.handlePopupClose(e)}>
<div className={containerClassName} style={pageStyle} ref={node => (this.node = node)} tabIndex={-1}>
Something something
</div>
</div>
</>
<Search />
);
}
}
function Search() {
let pageClass = 'search';
let className = 'gh-portal-popup-container';
const containerClassName = `${className} ${pageClass}`;
return (
<>
<div className={'gh-portal-popup-wrapper'}>
<div className={containerClassName} style={{}}>
Search posts, tags, and authors
</div>
</div>
</>
);
}
export default class PopupModal extends React.Component {
static contextType = AppContext;