pinafore/src/routes/_components/compose/ComposeMedia.html
Nolan Lawson 482ee3d3bb
fix: improve media upload a11y (#1240)
use ul/li instead of divs here
2019-05-27 12:31:42 -07:00

36 lines
794 B
HTML

{#if media.length}
<ul class="compose-media-container"
aria-label="Media uploads"
style="grid-template-columns: repeat({media.length}, 1fr);"
>
{#each media as mediaItem, index}
<ComposeMediaItem {realm} {mediaItem} {index} {media} />
{/each}
</ul>
{/if}
<style>
.compose-media-container {
grid-area: media;
list-style: none;
display: grid;
grid-column-gap: 5px;
align-items: center;
justify-content: center;
margin: 10px 0 0 0;
background: var(--form-bg);
padding: 5px;
border-radius: 4px;
}
</style>
<script>
import { store } from '../../_store/store'
import ComposeMediaItem from './ComposeMediaItem.html'
export default {
store: () => store,
components: {
ComposeMediaItem
}
}
</script>