UNPKG

1.82 kBJavaScriptView Raw
1import _extends from "@babel/runtime/helpers/esm/extends";
2import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3import * as React from 'react';
4import PropTypes from 'prop-types';
5import clsx from 'clsx';
6import withStyles from '../styles/withStyles';
7export const styles = {
8 /* Styles applied to the root element. */
9 root: {
10 position: 'absolute',
11 right: 16,
12 top: '50%',
13 transform: 'translateY(-50%)'
14 }
15};
16/**
17 * Must be used as the last child of ListItem to function properly.
18 */
19
20const ListItemSecondaryAction = /*#__PURE__*/React.forwardRef(function ListItemSecondaryAction(props, ref) {
21 const {
22 classes,
23 className
24 } = props,
25 other = _objectWithoutPropertiesLoose(props, ["classes", "className"]);
26
27 return /*#__PURE__*/React.createElement("div", _extends({
28 className: clsx(classes.root, className),
29 ref: ref
30 }, other));
31});
32process.env.NODE_ENV !== "production" ? ListItemSecondaryAction.propTypes = {
33 // ----------------------------- Warning --------------------------------
34 // | These PropTypes are generated from the TypeScript type definitions |
35 // | To update them edit the d.ts file and run "yarn proptypes" |
36 // ----------------------------------------------------------------------
37
38 /**
39 * The content of the component, normally an `IconButton` or selection control.
40 */
41 children: PropTypes.node,
42
43 /**
44 * Override or extend the styles applied to the component.
45 * See [CSS API](#css) below for more details.
46 */
47 classes: PropTypes.object,
48
49 /**
50 * @ignore
51 */
52 className: PropTypes.string
53} : void 0;
54ListItemSecondaryAction.muiName = 'ListItemSecondaryAction';
55export default withStyles(styles, {
56 name: 'MuiListItemSecondaryAction'
57})(ListItemSecondaryAction);
\No newline at end of file