You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stateless function component that use React.cloneElement aren't supported:
// @flow weakimportReactfrom'react';importPropTypesfrom'prop-types';importclassNamesfrom'classnames';importwarningfrom'warning';import{createStyleSheet}from'jss-theme-reactor';importcustomPropTypesfrom'../utils/customPropTypes';exportconststyleSheet=createStyleSheet('MuiListItemAvatar',()=>{return{denseAvatar: {width: 36,height: 36,fontSize: 18,marginRight: 4,},denseAvatarIcon: {width: 20,height: 20,},};});/** * `<ListItemAvatar>` is a simple wrapper to apply the `dense` mode styles to `Avatar`. * * ``` * <ListItemAvatar> * <Avatar> * </ListItemAvatar> * ``` */exportdefaultfunctionListItemAvatar(props,context){if(context.dense===undefined){warning(false,`Material-UI: <ListItemAvatar> is a simple wrapper to apply the dense styles to <Avatar>. You do not need it unless you are controlling the <List> dense property.`);returnprops.children;}const{
children,className: classNameProp,
...other}=props;constclasses=context.styleManager.render(styleSheet);returnReact.cloneElement(children,{className: classNames({[classes.denseAvatar]: context.dense},classNameProp,children.props.className,),childrenClassName: classNames({[classes.denseAvatarIcon]: context.dense},children.props.childrenClassName,),
...other,});}ListItemAvatar.propTypes={/** * The content of the component, normally `Avatar`. */children: PropTypes.element.isRequired,/** * The CSS class name of the root element. */className: PropTypes.string,};ListItemAvatar.contextTypes={dense: PropTypes.bool,styleManager: customPropTypes.muiRequired,};
The text was updated successfully, but these errors were encountered:
Stateless function component that use
React.cloneElement
aren't supported:The text was updated successfully, but these errors were encountered: