creating empty members component

This commit is contained in:
Alex Windett 2017-02-01 17:20:21 +00:00
parent ee4d78cdce
commit 4b684d077c
6 changed files with 26 additions and 21 deletions

View File

@ -10,6 +10,7 @@
"add-services": "Add services", "add-services": "Add services",
"no-services": "You dont have any services. You can either add them by editing a manifest file or by connecting your repo on GitHub or BitBucket.", "no-services": "You dont have any services. You can either add them by editing a manifest file or by connecting your repo on GitHub or BitBucket.",
"no-projects": "You dont have any projects.", "no-projects": "You dont have any projects.",
"no-people": "There are no members here. Add them above",
"edit-project-manifest": "Edit project manifest", "edit-project-manifest": "Edit project manifest",
"or-bring-in-from": "or bring in from", "or-bring-in-from": "or bring in from",
"your-settings": "Your settings", "your-settings": "Your settings",

View File

@ -0,0 +1,20 @@
const React = require('react');
const ReactIntl = require('react-intl');
const Column = require('@ui/components/column');
const Row = require('@ui/components/row');
const {
FormattedMessage
} = ReactIntl;
module.exports = () => (
<Row>
<Column xs={12}>
<p name='empty'>
<FormattedMessage id='no-people' />
</p>
</Column>
</Row>
);

View File

@ -17,3 +17,4 @@ module.exports = () => (
</Column> </Column>
</Row> </Row>
); );

View File

@ -1,17 +1,14 @@
const React = require('react'); const React = require('react');
const Empty = require('@components/empty/people');
const Row = require('@ui/components/row'); const Row = require('@ui/components/row');
const Column = require('@ui/components/column'); const Column = require('@ui/components/column');
const Button = require('@ui/components/button'); const Button = require('@ui/components/button');
const BaseElements = require('@ui/components/base-elements');
const PeopleTable = require('./table'); const PeopleTable = require('./table');
const Invite = require('./invite'); const Invite = require('./invite');
const {
H3,
} = BaseElements;
const buttonStyle = { const buttonStyle = {
float: 'right' float: 'right'
}; };
@ -44,7 +41,7 @@ const People = (props) => {
<Column xs={12}> <Column xs={12}>
{ people.length > 0 { people.length > 0
? <PeopleTable {...props} /> ? <PeopleTable {...props} />
: <H3>Noody here!</H3> } : <Empty /> }
</Column> </Column>
</Row> </Row>
</div> </div>

View File

@ -1,12 +0,0 @@
// WIP - possibly create a function like spacerXL, spacerS, spacerM for things lik
// padding, margins, widths
const baseunit = {
xs: 3,
s: 6,
m: 12,
l: 18,
xl: 24
};
module.exports = baseunit;

View File

@ -6,7 +6,6 @@ const boxes = require('./boxes');
const typography = require('./typography'); const typography = require('./typography');
const sizes = require('./sizes'); const sizes = require('./sizes');
const breakpoints = require('./breakpoints'); const breakpoints = require('./breakpoints');
const baseunit = require('./baseunits');
const tables = { const tables = {
bg: 'transparent', bg: 'transparent',
@ -23,8 +22,7 @@ const constants = traverse({
forms, forms,
sizes, sizes,
tables, tables,
typography, typography
baseunit
}).map(function(x) { }).map(function(x) {
return isFunction(x) ? x(this.parent.node) : x; return isFunction(x) ? x(this.parent.node) : x;
}); });