Media Gallery: Support for dark theme
This commit is contained in:
parent
3c69886320
commit
7e2d7b5e60
10 changed files with 236 additions and 190 deletions
|
@ -6,27 +6,10 @@ import { ItemClickEvent } from './types/ItemClickEvent';
|
|||
import { MediaGridItem } from './MediaGridItem';
|
||||
import { Message } from './types/Message';
|
||||
import { missingCaseError } from '../../../util/missingCaseError';
|
||||
|
||||
const styles = {
|
||||
container: {
|
||||
width: '100%',
|
||||
},
|
||||
header: {
|
||||
fontSize: 14,
|
||||
fontWeight: 'normal',
|
||||
lineHeight: '28px',
|
||||
} as React.CSSProperties,
|
||||
itemContainer: {
|
||||
display: 'flex',
|
||||
flexDirection: 'row',
|
||||
flexWrap: 'wrap',
|
||||
justifyContent: 'flex-start',
|
||||
alignItems: 'flex-start',
|
||||
} as React.CSSProperties,
|
||||
};
|
||||
import { Localizer } from '../../../types/Util';
|
||||
|
||||
interface Props {
|
||||
i18n: (value: string) => string;
|
||||
i18n: Localizer;
|
||||
header?: string;
|
||||
type: AttachmentType;
|
||||
messages: Array<Message>;
|
||||
|
@ -38,9 +21,11 @@ export class AttachmentSection extends React.Component<Props> {
|
|||
const { header } = this.props;
|
||||
|
||||
return (
|
||||
<div style={styles.container}>
|
||||
<h2 style={styles.header}>{header}</h2>
|
||||
<div style={styles.itemContainer}>{this.renderItems()}</div>
|
||||
<div className="module-attachment-section">
|
||||
<h2 className="module-attachment-section__header">{header}</h2>
|
||||
<div className="module-attachment-section__items">
|
||||
{this.renderItems()}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -61,6 +46,7 @@ export class AttachmentSection extends React.Component<Props> {
|
|||
key={message.id}
|
||||
message={message}
|
||||
onClick={onClick}
|
||||
i18n={i18n}
|
||||
/>
|
||||
);
|
||||
case 'documents':
|
||||
|
@ -69,7 +55,6 @@ export class AttachmentSection extends React.Component<Props> {
|
|||
key={message.id}
|
||||
fileName={firstAttachment.fileName}
|
||||
fileSize={firstAttachment.size}
|
||||
i18n={i18n}
|
||||
shouldShowSeparator={shouldShowSeparator}
|
||||
onClick={onClick}
|
||||
timestamp={message.received_at}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue