Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/@buffetjs/core/node_modules/reactstrap/src/ drwxr-xr-x | |
| Viewing file: Select action/file-type: import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { mapToCssModules, tagPropType } from './utils';
const propTypes = {
body: PropTypes.bool,
bottom: PropTypes.bool,
children: PropTypes.node,
className: PropTypes.string,
cssModule: PropTypes.object,
heading: PropTypes.bool,
left: PropTypes.bool,
list: PropTypes.bool,
middle: PropTypes.bool,
object: PropTypes.bool,
right: PropTypes.bool,
tag: tagPropType,
top: PropTypes.bool,
};
const Media = (props) => {
const {
body,
bottom,
className,
cssModule,
heading,
left,
list,
middle,
object,
right,
tag,
top,
...attributes
} = props;
let defaultTag;
if (heading) {
defaultTag = 'h4';
} else if (attributes.href) {
defaultTag = 'a';
} else if (attributes.src || object) {
defaultTag = 'img';
} else if (list) {
defaultTag = 'ul';
} else {
defaultTag = 'div';
}
const Tag = tag || defaultTag;
const classes = mapToCssModules(classNames(
className,
{
'media-body': body,
'media-heading': heading,
'media-left': left,
'media-right': right,
'media-top': top,
'media-bottom': bottom,
'media-middle': middle,
'media-object': object,
'media-list': list,
media: !body && !heading && !left && !right && !top && !bottom && !middle && !object && !list,
}
), cssModule);
return (
<Tag {...attributes} className={classes} />
);
};
Media.propTypes = propTypes;
export default Media;
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0041 ]-- |