Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

Commit

Permalink
Add styles to main and remove useless constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
el-mapache committed Oct 5, 2017
1 parent e56cd1d commit f39ad38
Show file tree
Hide file tree
Showing 25 changed files with 9 additions and 110 deletions.
4 changes: 0 additions & 4 deletions static_src/components/app_count_status.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ const defaultProps = {
};

export default class AppCountStatus extends React.Component {
constructor(props) {
super(props);
}

render() {
const props = this.props;
let health = entityHealth.inactive;
Expand Down
4 changes: 0 additions & 4 deletions static_src/components/app_quicklook.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ const defaultProps = {
};

export default class AppQuicklook extends React.Component {
constructor(props) {
super(props);
}

appHref() {
const props = this.props;
const appGuid = props.app.guid;
Expand Down
4 changes: 0 additions & 4 deletions static_src/components/breadcrumbs_item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ const propTypes = {
};

export default class BreadcrumbsItem extends React.Component {
constructor(props) {
super(props);
}

render() {
const url = this.props.url;
const content = url ?
Expand Down
4 changes: 0 additions & 4 deletions static_src/components/complex_list.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ const defaultProps = {
};

export default class ComplexList extends React.Component {
constructor(props) {
super(props);
}

hasAnyTitle() {
return !!(this.props.title || this.props.titleElement);
}
Expand Down
4 changes: 0 additions & 4 deletions static_src/components/complex_list_item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ const propTypes = {
const defaultProps = {};

export default class ComplexListItem extends React.Component {
constructor(props) {
super(props);
}

render() {
return (
<div className="complex_list-item">
Expand Down
4 changes: 0 additions & 4 deletions static_src/components/count_status.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ const defaultProps = {
};

export default class CountStatus extends React.Component {
constructor(props) {
super(props);
}

render() {
const props = this.props;
const statusClass = `count_status-${props.health.toLowerCase()}`;
Expand Down
4 changes: 0 additions & 4 deletions static_src/components/elastic_line.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ const defaultProps = {
};

export default class ElasticLine extends React.Component {
constructor(props) {
super(props);
}

render() {
return (
<div className="elastic_line">
Expand Down
4 changes: 0 additions & 4 deletions static_src/components/elastic_line_item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ const defaultProps = {
};

export default class ElasticLineItem extends React.Component {
constructor(props) {
super(props);
}

render() {
const props = this.props;
const alignClass = `elastic_line-item-${props.align}`;
Expand Down
4 changes: 0 additions & 4 deletions static_src/components/entity_empty.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ const defaultProps = {
};

export default class EntityEmpty extends React.Component {
constructor(props) {
super(props);
}

render() {
const props = this.props;
return (
Expand Down
4 changes: 0 additions & 4 deletions static_src/components/entity_icon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ const defaultProps = {
};

export default class EntityIcon extends React.Component {
constructor(props) {
super(props);
}

render() {
const statusClass = this.props.health;

Expand Down
6 changes: 1 addition & 5 deletions static_src/components/expandable_box.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,10 @@ const defaultProps = {
};

export default class ExpandableBox extends React.Component {
constructor(props) {
super(props);
}

render() {
const expandedClass = this.props.isExpanded && 'expandable_box-is_expanded';
return (
<div className={[expandable_box, expandedClass, ...this.props.classes].join(' ')}>
<div className={['expandable_box', expandedClass, ...this.props.classes].join(' ')}>
<div className="expandable_box-click" onClick={ this.props.clickHandler }>
{ this.props.clickableContent }
</div>
Expand Down
4 changes: 0 additions & 4 deletions static_src/components/footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ import React from 'react';
import { config } from 'skin';

export default class Header extends React.Component {
constructor(props) {
super(props);
}

render() {
return (
<footer className="grid footer footer-no_sidebar">
Expand Down
24 changes: 6 additions & 18 deletions static_src/components/form/form_text.jsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
import PropTypes from 'prop-types';
import React from 'react';
import style from 'cloudgov-style/css/cloudgov-style.css';
import FormElement from './form_element.jsx';
import FormError from './form_error.jsx';
import createStyler from '../../util/create_styler';
import classnames from 'classnames';

export default class FormText extends FormElement {
constructor(props) {
super(props);
this.state = this.state || {};
this.styler = createStyler(style);
}

get error() {
if (!this.state.err) {
return null;
Expand All @@ -21,20 +14,15 @@ export default class FormText extends FormElement {
}

render() {
const classes = [];

if (this.props.inline) {
classes.push('form_text-inline');
}

if (!!this.error) {
classes.push('error');
}
const classes = classnames({
'form_text-inline': this.props.inline,
error: !!this.error
});

// Spaces in label give a healthy space for inline forms
const label = <label htmlFor={ this.key }> { this.props.label } </label>;
return (
<div className={ this.styler(classes) }>
<div className={ classes }>
{ !this.props.labelAfter && label }
<input type="text" id={ this.key } value={ this.state.value }
onChange={ this.onChange } className={ this.classes }
Expand Down
5 changes: 0 additions & 5 deletions static_src/components/header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ import Action from './action.jsx';
import { config } from 'skin';

export default class Header extends React.Component {

constructor(props) {
super(props);
}

getImagePath(iconName) {
const img = require('cloudgov-style/img/cloudgov-sprite.svg');
return `/assets/${img}#${iconName}`;
Expand Down
5 changes: 0 additions & 5 deletions static_src/components/header_link.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ const propTypes = {
};

export default class HeaderLink extends React.Component {

constructor(props) {
super(props);
}

render() {
let linkContent = (<a href={this.props.url} className={ this.props.classes }>
{this.props.text}</a>);
Expand Down
4 changes: 0 additions & 4 deletions static_src/components/icon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ const defaultProps = {
};

export default class Icon extends React.Component {
constructor(props) {
super(props);
}

getImagePath(iconName) {
const img = require('cloudgov-style/img/cloudgov-sprite.svg');
const fill = this.props.iconType === 'fill' ? 'fill-' : '';
Expand Down
4 changes: 0 additions & 4 deletions static_src/components/info_activities.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ const defaultProps = {
};

export default class InfoActivities extends React.Component {
constructor(props) {
super(props);
}

render() {
return (
<section className={ this.props.className }>
Expand Down
4 changes: 0 additions & 4 deletions static_src/components/info_app_create.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ const defaultProps = {


export default class InfoAppCreate extends React.Component {
constructor(props) {
super(props);
}

get noPermission() {
return (
<p>
Expand Down
4 changes: 0 additions & 4 deletions static_src/components/info_environments.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ const defaultProps = {
};

export default class InfoEnvironment extends React.Component {
constructor(props) {
super(props);
}

render() {
return (
<section className={ this.props.className }></section>
Expand Down
4 changes: 0 additions & 4 deletions static_src/components/info_logs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ import { config } from 'skin';
import PanelActions from './panel_actions.jsx';

export default class InfoLogs extends React.Component {
constructor(props) {
super(props);
}

render() {
return (
<PanelActions>
Expand Down
4 changes: 0 additions & 4 deletions static_src/components/info_sandbox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ const defaultProps = {
};

export default class InfoSandbox extends React.Component {
constructor(props) {
super(props);
}

render() {
return (
<section className={ this.props.className }>
Expand Down
4 changes: 0 additions & 4 deletions static_src/components/info_structure.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ const defaultProps = {
};

export default class InfoStructure extends React.Component {
constructor(props) {
super(props);
}

render() {
return (
<section className={ this.props.className }>
Expand Down
4 changes: 0 additions & 4 deletions static_src/components/page_header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ const propTypes = {
};

export default class PageHeader extends React.Component {
constructor(props) {
super(props);
}

get actions() {
if (!this.props.children) {
return null;
Expand Down
2 changes: 1 addition & 1 deletion static_src/components/route_form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default class RouteForm extends React.Component {
}

return (
<form className="route-form panel-form-replace" } onSubmit={ this._onSubmit }>
<form className="route-form panel-form-replace" onSubmit={ this._onSubmit }>
{ limit }
<fieldset>
<div className="route-fields">
Expand Down
1 change: 1 addition & 0 deletions static_src/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'cloudgov-style/css/base.css';
import 'cloudgov-style/css/cloudgov-style.css';
import './css/main.css';
// Icon used in cg-uaa.
import './img/dashboard-uaa-icon.jpg';
Expand Down

0 comments on commit f39ad38

Please sign in to comment.