Add `EmptyState` component
parent
ea49f7a3b6
commit
78f15b654d
@ -0,0 +1,5 @@
|
||||
```js
|
||||
<div style={{position: 'relative', width: '100%', height: 300}}>
|
||||
<EmptyState label="You have no attachments with media"/>
|
||||
</div>
|
||||
```
|
@ -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>;
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
/**
|
||||
* @prettier
|
||||
*/
|
||||
export const TEXT_SECONDARY = '#bbb';
|
Loading…
Reference in New Issue