mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 09:18:59 +00:00
ac9a38c207
* LoginPage component and route * animated SVG background image utility * Kolide text, User, Lock, & Kolide logo SVG icons * styleguide * Adds global footer * Adds InputFieldWithIcon component * Adds LoginForm component * Render LoginForm from the LoginPage
30 lines
651 B
JavaScript
30 lines
651 B
JavaScript
import React, { Component, PropTypes } from 'react';
|
|
import { keys, pick } from 'lodash';
|
|
import radium from 'radium';
|
|
|
|
export const basePropTypes = {
|
|
alt: PropTypes.string,
|
|
name: PropTypes.string,
|
|
style: PropTypes.object,
|
|
variant: PropTypes.string,
|
|
};
|
|
|
|
export default function (SVGComponent) {
|
|
class ComponentWrapper extends Component {
|
|
static propTypes = {
|
|
...basePropTypes,
|
|
};
|
|
|
|
static defaultProps = {
|
|
variant: 'default',
|
|
};
|
|
|
|
render () {
|
|
const svgProps = pick(this.props, keys(ComponentWrapper.propTypes));
|
|
return <SVGComponent {...svgProps} />;
|
|
}
|
|
}
|
|
|
|
return radium(ComponentWrapper);
|
|
}
|