Add EmptyState
component
This commit is contained in:
5
ts/components/conversation/media-gallery/EmptyState.md
Normal file
5
ts/components/conversation/media-gallery/EmptyState.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
```js
|
||||||
|
<div style={{position: 'relative', width: '100%', height: 300}}>
|
||||||
|
<EmptyState label="You have no attachments with media"/>
|
||||||
|
</div>
|
||||||
|
```
|
29
ts/components/conversation/media-gallery/EmptyState.tsx
Normal file
29
ts/components/conversation/media-gallery/EmptyState.tsx
Normal 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>;
|
||||||
|
}
|
||||||
|
}
|
4
ts/components/styles/Colors.ts
Normal file
4
ts/components/styles/Colors.ts
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
/**
|
||||||
|
* @prettier
|
||||||
|
*/
|
||||||
|
export const TEXT_SECONDARY = '#bbb';
|
Reference in New Issue
Block a user