Add EmptyState component

This commit is contained in:
Daniel Gasienica 2018-04-26 17:52:43 -04:00
parent ea49f7a3b6
commit 78f15b654d
3 changed files with 38 additions and 0 deletions

View file

@ -0,0 +1,5 @@
```js
<div style={{position: 'relative', width: '100%', height: 300}}>
<EmptyState label="You have no attachments with media"/>
</div>
```

View file

@ -0,0 +1,29 @@
/**
* @prettier
*/
import React from 'react';
import * as Colors from '../../styles/Colors';
interface Props {
label: string;
}
const styles = {
container: {
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
flexGrow: 1,
fontSize: 28,
color: Colors.TEXT_SECONDARY,
} as React.CSSProperties,
};
export class EmptyState extends React.Component<Props, {}> {
public render() {
const { label } = this.props;
return <div style={styles.container}>{label}</div>;
}
}

View file

@ -0,0 +1,4 @@
/**
* @prettier
*/
export const TEXT_SECONDARY = '#bbb';