From 6e6681a5532f6e75829fc566b7f7627ed3435271 Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Tue, 22 Nov 2016 09:08:08 -0300 Subject: [PATCH] Styles and refactor errors --- client/coral-admin/src/components/Comment.js | 13 +++++++------ .../coral-admin/src/components/CommentList.js | 6 +++--- client/coral-admin/src/components/ui/Header.css | 17 +++++++++++++++++ client/coral-admin/src/components/ui/Header.js | 12 ++++++------ 4 files changed, 33 insertions(+), 15 deletions(-) diff --git a/client/coral-admin/src/components/Comment.js b/client/coral-admin/src/components/Comment.js index 154d68134..1106435b0 100644 --- a/client/coral-admin/src/components/Comment.js +++ b/client/coral-admin/src/components/Comment.js @@ -1,6 +1,6 @@ import React from 'react'; -import {Button, Icon} from 'react-mdl'; +import {FABButton, Icon} from 'react-mdl'; import timeago from 'timeago.js'; import styles from './CommentList.css'; import I18n from 'coral-framework/modules/i18n/i18n'; @@ -14,7 +14,7 @@ export default props => { const links = linkify.getMatches(props.comment.get('body')); return ( -
  • +
  • person @@ -26,12 +26,13 @@ export default props => { {links ? Contains Link : null}
    - {props.actions.map(action => canShowAction(action, props.comment) ? ( - + ) : null)}
    diff --git a/client/coral-admin/src/components/CommentList.js b/client/coral-admin/src/components/CommentList.js index 819de62b0..e4682252d 100644 --- a/client/coral-admin/src/components/CommentList.js +++ b/client/coral-admin/src/components/CommentList.js @@ -112,15 +112,15 @@ export default class CommentList extends React.Component { } render () { - const {singleView, commentIds, comments, hideActive} = this.props; + const {singleView, commentIds, comments, hideActive, key} = this.props; const {active} = this.state; return ( -
      +
        {commentIds.map((commentId, index) => ( { if (el && commentId === active) { this._active = el; } }} - key={`${index }comment`} + key={index} index={index} onClickAction={this.onClickAction} actions={this.props.actions} diff --git a/client/coral-admin/src/components/ui/Header.css b/client/coral-admin/src/components/ui/Header.css index b80dca496..3d4e7dc77 100644 --- a/client/coral-admin/src/components/ui/Header.css +++ b/client/coral-admin/src/components/ui/Header.css @@ -2,3 +2,20 @@ background: #505050; overflow: hidden; } + +.header > div { + position: relative; + padding: 0; + width: 1170px; + margin: 0 auto; +} + +.active { + background: #232323; +} + +.version { + position: absolute; + right: 0; + width: 50px; +} diff --git a/client/coral-admin/src/components/ui/Header.js b/client/coral-admin/src/components/ui/Header.js index af08eb024..7ba88d25a 100644 --- a/client/coral-admin/src/components/ui/Header.js +++ b/client/coral-admin/src/components/ui/Header.js @@ -10,13 +10,13 @@ export default () => (
        - {lang.t('configure.moderate')} - {lang.t('configure.community')} - {lang.t('configure.configure')} - - {`v${process.env.VERSION}`} - + {lang.t('configure.moderate')} + {lang.t('configure.community')} + {lang.t('configure.configure')} +
        + {`v${process.env.VERSION}`} +
        );