1 | "use strict";
|
2 |
|
3 | var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
4 |
|
5 | var _react = _interopRequireDefault(require("react"));
|
6 |
|
7 | var _styles = require("@material-ui/core/styles");
|
8 |
|
9 | var _ListItem = _interopRequireDefault(require("@material-ui/core/ListItem"));
|
10 |
|
11 | var _ListItemIcon = _interopRequireDefault(require("@material-ui/core/ListItemIcon"));
|
12 |
|
13 | var _ListItemText = _interopRequireDefault(require("@material-ui/core/ListItemText"));
|
14 |
|
15 | var _propTypes = _interopRequireDefault(require("prop-types"));
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 | var styles = {
|
23 | label: {
|
24 | '& > span': {
|
25 | textDecoration: 'none',
|
26 | display: 'inline-block'
|
27 | }
|
28 | }
|
29 | };
|
30 |
|
31 | var DrawerItemJSX = function DrawerItemJSX(_ref) {
|
32 | var classes = _ref.classes,
|
33 | label = _ref.label,
|
34 | Icon = _ref.icon;
|
35 | return _react.default.createElement(_ListItem.default, {
|
36 | button: true
|
37 | }, Icon && _react.default.createElement(_ListItemIcon.default, null, _react.default.createElement(Icon, null)), _react.default.createElement(_ListItemText.default, {
|
38 | primary: label,
|
39 | className: classes.label
|
40 | }));
|
41 | };
|
42 |
|
43 | DrawerItemJSX.propTypes = {
|
44 | classes: _propTypes.default.object.isRequired,
|
45 | label: _propTypes.default.string.isRequired,
|
46 | icon: _propTypes.default.func
|
47 | };
|
48 | var DrawerItem = (0, _styles.withStyles)(styles)(DrawerItemJSX);
|
49 | module.exports = DrawerItem; |
\ | No newline at end of file |