Improve staged attachment designs

This commit is contained in:
Evan Hahn 2021-09-20 20:23:55 -05:00 committed by GitHub
parent 4e6c415ad8
commit a68e3a6d20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 44 additions and 20 deletions

View file

@ -79,6 +79,7 @@ export const AttachmentList = ({
alt={i18n('stagedImageAttachment', [
attachment.fileName || url || index.toString(),
])}
className="module-staged-attachment"
i18n={i18n}
attachment={attachment}
softCorners

View file

@ -1,4 +1,4 @@
// Copyright 2018-2020 Signal Messenger, LLC
// Copyright 2018-2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import React from 'react';
@ -18,6 +18,7 @@ export type Props = {
attachment: AttachmentType;
url?: string;
className?: string;
height?: number;
width?: number;
cropWidth?: number;
@ -140,6 +141,7 @@ export class Image extends React.Component<Props> {
attachment,
blurHash,
bottomOverlay,
className,
closeButton,
curveBottomLeft,
curveBottomRight,
@ -202,6 +204,7 @@ export class Image extends React.Component<Props> {
<div
className={classNames(
'module-image',
className,
!noBackground ? 'module-image--with-background' : null,
curveBottomLeft ? 'module-image--curved-bottom-left' : null,
curveBottomRight ? 'module-image--curved-bottom-right' : null,

View file

@ -1,4 +1,4 @@
// Copyright 2018-2020 Signal Messenger, LLC
// Copyright 2018-2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import React from 'react';
@ -21,7 +21,7 @@ export const StagedGenericAttachment = ({
const extension = getExtensionForDisplay({ contentType, fileName });
return (
<div className="module-staged-generic-attachment">
<div className="module-staged-attachment module-staged-generic-attachment">
<button
type="button"
className="module-staged-generic-attachment__close-button"