mirror of
https://github.com/mastodon/mastodon.git
synced 2025-11-29 10:53:39 +00:00
allow dynamic resizing of width
This commit is contained in:
parent
bf2b501347
commit
0b81c547c2
|
|
@ -36,7 +36,21 @@ const StoryComponent: FC<{ locale: string }> = ({ locale }) => {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<MockEmojiPicker onSelect={onSelect} onSkinToneChange={onSkinToneChange} />
|
<div
|
||||||
|
style={{
|
||||||
|
resize: 'horizontal',
|
||||||
|
padding: '1rem',
|
||||||
|
border: '1px solid gray',
|
||||||
|
overflow: 'auto',
|
||||||
|
width: '400px',
|
||||||
|
minWidth: 'calc(250px + 2rem)',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<MockEmojiPicker
|
||||||
|
onSelect={onSelect}
|
||||||
|
onSkinToneChange={onSkinToneChange}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,15 @@
|
||||||
.wrapper {
|
.wrapper {
|
||||||
--max-width: 20rem;
|
|
||||||
--col-count: 6;
|
|
||||||
|
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
grid-template-rows: auto 1fr;
|
grid-template-rows: auto 1fr;
|
||||||
grid-template-columns: 2rem minmax(10rem, calc(var(--max-width) - 4rem));
|
grid-template-columns: 2rem auto;
|
||||||
background-color: lightgray;
|
background-color: lightgray;
|
||||||
padding: 0.5rem;
|
padding: 0.5rem;
|
||||||
border-radius: 0.25rem;
|
border-radius: 0.25rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: var(--max-width);
|
|
||||||
max-height: 50vh;
|
max-height: 50vh;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
min-width: 250px;
|
||||||
|
|
||||||
:global(.emojione) {
|
:global(.emojione) {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
@ -97,7 +94,7 @@
|
||||||
|
|
||||||
.emojiGrid {
|
.emojiGrid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(var(--col-count), 1fr);
|
grid-template-columns: repeat(auto-fill, minmax(2rem, 1fr));
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user