mirror of
https://github.com/fleetdm/fleet
synced 2026-05-17 14:08:25 +00:00
* Api client get targets * Allow entities to parse full api response * responsive nav style fixes * Add disabled prop to button * Add targets from API to target select input * customize target rendering in input field * call API on select target input change * display # hosts selected * Adds new icons to icon font * Customize select targets input options * Update directory structure * restructure select targets input * Adds hosts to labels * Host modal styles * ShadowBoxInput component * TargetInfoModal for labels * consistent entity response in api client stubs * Fix bug removing multiple hosts in target select input * change Button component to use css classes
32 lines
871 B
JavaScript
32 lines
871 B
JavaScript
import React, { Component, PropTypes } from 'react';
|
|
import classnames from 'classnames';
|
|
|
|
const baseClass = 'shadow-box-input';
|
|
|
|
class ShadowBoxInput extends Component {
|
|
static propTypes = {
|
|
className: PropTypes.string,
|
|
iconClass: PropTypes.string,
|
|
name: PropTypes.string,
|
|
placeholder: PropTypes.string,
|
|
};
|
|
|
|
render () {
|
|
const { className, iconClass, name, placeholder } = this.props;
|
|
const fullIconClassName = classnames(iconClass, `${baseClass}__icon`);
|
|
const fullWrapperClassName = classnames(className, `${baseClass}__wrapper`);
|
|
|
|
return (
|
|
<div className={fullWrapperClassName}>
|
|
<input
|
|
className={`${baseClass}__input`}
|
|
name={name}
|
|
placeholder={placeholder}
|
|
/>
|
|
{iconClass && <i className={fullIconClassName} />}
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default ShadowBoxInput;
|