From 54ac2985ba6c4850f84324b8aacd7e078349488b Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Wed, 8 Nov 2017 12:23:29 -0300 Subject: [PATCH] Adding classes --- client/coral-admin/src/routes/Community/components/People.js | 3 ++- client/coral-admin/src/routes/Community/components/Table.js | 4 +++- client/coral-ui/components/Dropdown.js | 4 ++-- client/coral-ui/components/Option.js | 4 +++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/client/coral-admin/src/routes/Community/components/People.js b/client/coral-admin/src/routes/Community/components/People.js index 75d08429a..b92bd679a 100644 --- a/client/coral-admin/src/routes/Community/components/People.js +++ b/client/coral-admin/src/routes/Community/components/People.js @@ -1,4 +1,5 @@ import React from 'react'; +import cn from 'classnames'; import styles from './styles.css'; import Table from './Table'; import {Icon} from 'coral-ui'; @@ -24,7 +25,7 @@ const People = (props) => { const hasResults = !!users.length; return ( -
+
diff --git a/client/coral-admin/src/routes/Community/components/Table.js b/client/coral-admin/src/routes/Community/components/Table.js index 22b02cfe4..aa2db6ff6 100644 --- a/client/coral-admin/src/routes/Community/components/Table.js +++ b/client/coral-admin/src/routes/Community/components/Table.js @@ -42,7 +42,7 @@ const Table = ({users, setRole, onHeaderClickHandler, setCommenterStatus, viewUs {users.map((row, i)=> ( - + {row.profiles.map(({id}) => id)} @@ -52,6 +52,7 @@ const Table = ({users, setRole, onHeaderClickHandler, setCommenterStatus, viewUs setCommenterStatus(row.id, status)}> @@ -61,6 +62,7 @@ const Table = ({users, setRole, onHeaderClickHandler, setCommenterStatus, viewUs setRole(row.id, role)}> diff --git a/client/coral-ui/components/Dropdown.js b/client/coral-ui/components/Dropdown.js index 2cad6e990..dddffbfa2 100644 --- a/client/coral-ui/components/Dropdown.js +++ b/client/coral-ui/components/Dropdown.js @@ -131,7 +131,7 @@ class Dropdown extends React.Component { const {containerClassName, toggleClassName, toggleOpenClassName} = this.props; return ( -
+
-
    +
      {React.Children.toArray(this.props.children) .map((child, i) => React.cloneElement(child, { diff --git a/client/coral-ui/components/Option.js b/client/coral-ui/components/Option.js index 5b752eb48..8fd92a904 100644 --- a/client/coral-ui/components/Option.js +++ b/client/coral-ui/components/Option.js @@ -16,8 +16,9 @@ class Option extends React.Component { render() { const {className, label = '', onClick, onKeyDown} = this.props; + const id = this.props.id ? this.props.id : this.props.value; return ( -
    • +
    • {label}
    • ); @@ -26,6 +27,7 @@ class Option extends React.Component { Option.propTypes = { className: PropTypes.string, + id: PropTypes.string, label: PropTypes.string, onClick: PropTypes.func, onKeyDown: PropTypes.func,