Polish up the My Stories page
This commit is contained in:
parent
68398823e3
commit
984f26c98e
5 changed files with 69 additions and 43 deletions
|
@ -133,6 +133,10 @@ export const TextAttachment = ({
|
|||
node.setSelectionRange(node.value.length, node.value.length);
|
||||
}, [isEditingText]);
|
||||
|
||||
const storyBackgroundColor = {
|
||||
background: getBackgroundColor(textAttachment),
|
||||
};
|
||||
|
||||
return (
|
||||
<Measure bounds>
|
||||
{({ contentRect, measureRef }) => (
|
||||
|
@ -151,11 +155,12 @@ export const TextAttachment = ({
|
|||
}
|
||||
}}
|
||||
ref={measureRef}
|
||||
style={isThumbnail ? storyBackgroundColor : undefined}
|
||||
>
|
||||
<div
|
||||
className="TextAttachment__story"
|
||||
style={{
|
||||
background: getBackgroundColor(textAttachment),
|
||||
...(isThumbnail ? {} : storyBackgroundColor),
|
||||
transform: `scale(${(contentRect.bounds?.height || 1) / 1280})`,
|
||||
}}
|
||||
>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue