mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 12:19:41 +00:00
Consolidate styles
This commit is contained in:
@@ -45,14 +45,7 @@ const styles = {
|
||||
display: 'inline-flex',
|
||||
justifyContent: 'center',
|
||||
} as React.CSSProperties,
|
||||
image: {
|
||||
flexGrow: 1,
|
||||
flexShrink: 0,
|
||||
maxWidth: '100%',
|
||||
maxHeight: '100%',
|
||||
objectFit: 'contain',
|
||||
} as React.CSSProperties,
|
||||
video: {
|
||||
object: {
|
||||
flexGrow: 1,
|
||||
flexShrink: 0,
|
||||
maxWidth: '100%',
|
||||
@@ -130,7 +123,7 @@ const Icon = ({
|
||||
}) => (
|
||||
<div
|
||||
style={{
|
||||
...styles.image,
|
||||
...styles.object,
|
||||
...colorSVG(url, Colors.ICON_SECONDARY),
|
||||
maxWidth: 200,
|
||||
}}
|
||||
@@ -204,7 +197,7 @@ export class Lightbox extends React.Component<Props, {}> {
|
||||
if (isImageTypeSupported) {
|
||||
return (
|
||||
<img
|
||||
style={styles.image}
|
||||
style={styles.object}
|
||||
src={objectURL}
|
||||
onClick={this.onObjectClick}
|
||||
/>
|
||||
@@ -214,7 +207,7 @@ export class Lightbox extends React.Component<Props, {}> {
|
||||
const isVideoTypeSupported = GoogleChrome.isVideoTypeSupported(contentType);
|
||||
if (isVideoTypeSupported) {
|
||||
return (
|
||||
<video controls={true} style={styles.video}>
|
||||
<video controls={true} style={styles.object}>
|
||||
<source src={objectURL} />
|
||||
</video>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user