Add EmptyState
component
This commit is contained in:
parent
ea49f7a3b6
commit
78f15b654d
3 changed files with 38 additions and 0 deletions
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';
|
Loading…
Add table
Reference in a new issue