mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
Remove ShadowBox & ShadowBoxInput (#537)
This commit is contained in:
parent
7acec77303
commit
9a769d67a4
7 changed files with 0 additions and 120 deletions
|
|
@ -1,19 +0,0 @@
|
|||
import React, { Component, PropTypes } from 'react';
|
||||
|
||||
class ShadowBox extends Component {
|
||||
static propTypes = {
|
||||
children: PropTypes.node,
|
||||
};
|
||||
|
||||
render () {
|
||||
const { children } = this.props;
|
||||
|
||||
return (
|
||||
<div className="shadow-box__wrapper">
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default ShadowBox;
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
.shadow-box {
|
||||
&__wrapper {
|
||||
border: 1px solid $accent-medium;
|
||||
border-radius: 2px;
|
||||
box-shadow: inset 0 0 5px 0 rgba($black, 0.12);
|
||||
margin-bottom: $base;
|
||||
padding: $xsmall;
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
export default from './ShadowBox';
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
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;
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
import React from 'react';
|
||||
import expect from 'expect';
|
||||
import { mount } from 'enzyme';
|
||||
|
||||
import ShadowBoxInput from './ShadowBoxInput';
|
||||
|
||||
describe('ShadowBoxInput - component', () => {
|
||||
it('renders an input field', () => {
|
||||
const component = mount(
|
||||
<ShadowBoxInput name="my-input" />
|
||||
);
|
||||
|
||||
expect(component.find('input').length).toEqual(1);
|
||||
});
|
||||
|
||||
it('does not render an icon without an icon class', () => {
|
||||
const component = mount(
|
||||
<ShadowBoxInput name="my-input" />
|
||||
);
|
||||
|
||||
expect(component.find('i').length).toEqual(0);
|
||||
});
|
||||
|
||||
it('renders an icon with an icon class', () => {
|
||||
const component = mount(
|
||||
<ShadowBoxInput name="my-input" iconClass="kolidecon-label" />
|
||||
);
|
||||
|
||||
expect(component.find('i').length).toEqual(1);
|
||||
});
|
||||
});
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
.shadow-box-input {
|
||||
&__icon {
|
||||
color: $accent-medium;
|
||||
font-size: $medium;
|
||||
position: absolute;
|
||||
right: 6px;
|
||||
top: 12px;
|
||||
}
|
||||
|
||||
&__input {
|
||||
border: 1px solid $accent-medium;
|
||||
box-shadow: inset 0 0 5px 0 rgba($black, 0.12);
|
||||
color: $text-medium;
|
||||
font-size: $small;
|
||||
padding-left: 4px;
|
||||
|
||||
@include placeholder {
|
||||
color: $text-medium;
|
||||
font-size: $small;
|
||||
}
|
||||
}
|
||||
|
||||
&__wrapper {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
export default from './ShadowBoxInput';
|
||||
Loading…
Reference in a new issue