mirror of
https://github.com/HSLdevcom/digitransit-ui
synced 2025-09-21 05:02:45 +02:00
26 lines
664 B
JavaScript
26 lines
664 B
JavaScript
import PropTypes from 'prop-types';
|
|
import React from 'react';
|
|
import { intlShape } from 'react-intl';
|
|
import { matchShape, routerShape } from 'found';
|
|
|
|
export const SettingsDrawer = ({ children, open, className }) => {
|
|
if (open) {
|
|
return <div className={className}>{children}</div>;
|
|
}
|
|
return null;
|
|
};
|
|
|
|
SettingsDrawer.propTypes = {
|
|
open: PropTypes.bool.isRequired,
|
|
className: PropTypes.string.isRequired,
|
|
children: PropTypes.node.isRequired,
|
|
};
|
|
|
|
SettingsDrawer.contextTypes = {
|
|
config: PropTypes.object.isRequired,
|
|
intl: intlShape.isRequired,
|
|
router: routerShape.isRequired,
|
|
match: matchShape.isRequired,
|
|
};
|
|
|
|
export default SettingsDrawer;
|