Make shared-components tiles render identically outside Element Web - # 2 (#33485)
* Adding correct layout/density attributes to unit tests * Move app/web styling to FileBodyView * Unify styling for MediaBody wrapped components * Fix prettier issues * Update app/web snapshots * Wrap file download and audio loading states in MediaBody * Revert the MediaBody for download buttons. * Revert changes for MediaBody wrappers * Updated snaphots for MediaBody components
This commit is contained in:
@@ -7,6 +7,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React, { type ReactNode } from "react";
|
||||
import { MediaBody } from "@element-hq/web-shared-components";
|
||||
|
||||
import PlayPauseButton from "./PlayPauseButton";
|
||||
import PlaybackClock from "./PlaybackClock";
|
||||
@@ -74,8 +75,8 @@ export default class RecordingPlayback extends AudioPlayerBase<IProps> {
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className="mx_MediaBody mx_VoiceMessagePrimaryContainer"
|
||||
<MediaBody
|
||||
className="mx_VoiceMessagePrimaryContainer"
|
||||
onKeyDown={this.onKeyDown}
|
||||
data-testid="recording-playback"
|
||||
>
|
||||
@@ -85,7 +86,7 @@ export default class RecordingPlayback extends AudioPlayerBase<IProps> {
|
||||
ref={this.playPauseRef}
|
||||
/>
|
||||
{body}
|
||||
</div>
|
||||
</MediaBody>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React, { type ReactNode } from "react";
|
||||
import { MediaBody } from "@element-hq/web-shared-components";
|
||||
import { type Room, type IEventRelation, type MatrixEvent } from "matrix-js-sdk/src/matrix";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import { DeleteIcon, StopSolidIcon } from "@vector-im/compound-design-tokens/assets/web/icons";
|
||||
@@ -239,10 +240,10 @@ export default class VoiceRecordComposerTile extends React.PureComponent<IProps,
|
||||
|
||||
// only other UI is the recording-in-progress UI
|
||||
return (
|
||||
<div className="mx_MediaBody mx_VoiceMessagePrimaryContainer mx_VoiceRecordComposerTile_recording">
|
||||
<MediaBody className="mx_VoiceMessagePrimaryContainer mx_VoiceRecordComposerTile_recording">
|
||||
<LiveRecordingClock recorder={this.state.recorder} />
|
||||
<LiveRecordingWaveform recorder={this.state.recorder} />
|
||||
</div>
|
||||
</MediaBody>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user