Sha256: 545d8117a0e107ce623e50ee8e09f1c720a9e3c8fbf5cfa9c5fe210d48dee806
Contents?: true
Size: 921 Bytes
Versions: 100
Compression:
Stored size: 921 Bytes
Contents
import React from 'react'; import PropTypes from 'prop-types'; import { ActionButtons } from 'foremanReact/components/common/ActionButtons/ActionButtons'; import HostStatus from './HostStatus'; const HostItem = ({ name, link, status, actions }) => { const hostLink = link ? ( <a href={link}>{name}</a> ) : ( <a href="#" className="disabled"> {name} </a> ); return ( <tr id={`targeting-host-${name}`}> <td className="host_name">{hostLink}</td> <td className="host_status"> <HostStatus status={status} /> </td> <td className="host_actions"> <ActionButtons buttons={[...actions]} /> </td> </tr> ); }; HostItem.propTypes = { name: PropTypes.string.isRequired, link: PropTypes.string.isRequired, status: PropTypes.string.isRequired, actions: PropTypes.array, }; HostItem.defaultProps = { actions: [], }; export default HostItem;
Version data entries
100 entries across 100 versions & 1 rubygems