Pinned messages UI fixes

This commit is contained in:
Jamie
2026-01-13 12:01:07 -08:00
committed by GitHub
parent a27a87a934
commit 560224f516
14 changed files with 133 additions and 187 deletions

View File

@@ -11,12 +11,9 @@ export default {
} satisfies Meta<Props>;
const createProps = (overrideProps: Partial<Props> = {}): Props => ({
direction: overrideProps.direction || 'outgoing',
expirationLength: overrideProps.expirationLength || 30 * 1000,
expirationTimestamp:
overrideProps.expirationTimestamp || Date.now() + 30 * 1000,
withImageNoCaption: overrideProps.withImageNoCaption || false,
withSticker: overrideProps.withSticker || false,
});
export const _30Seconds = (): React.JSX.Element => {
@@ -51,38 +48,6 @@ export function Expired(): React.JSX.Element {
return <ExpireTimer {...props} />;
}
export function Sticker(): React.JSX.Element {
const props = createProps({
withSticker: true,
});
return <ExpireTimer {...props} />;
}
export function ImageNoCaption(): React.JSX.Element {
const props = createProps({
withImageNoCaption: true,
});
return (
<div style={{ backgroundColor: 'darkgreen' }}>
<ExpireTimer {...props} />
</div>
);
}
export function Incoming(): React.JSX.Element {
const props = createProps({
direction: 'incoming',
});
return (
<div style={{ backgroundColor: 'darkgreen' }}>
<ExpireTimer {...props} />
</div>
);
}
export function ExpirationTooFarOut(): React.JSX.Element {
const props = createProps({
expirationTimestamp: Date.now() + 150 * 1000,