SectionFooter
Раскладка низа раздела: линия сверху, ряд со ссылкой и группой кнопок и действия в конце, а кнопки кладёт потребитель.
Импорт
ts
import { SectionFooter, SectionFooterDivider, SectionFooterContent, SectionFooterActions } from '@prosper/ui'Анатомия
vue
<SectionFooter>
<SectionFooterDivider />
<SectionFooterContent>
…
<SectionFooterActions>…</SectionFooterActions>
</SectionFooterContent>
</SectionFooter>Примеры
По умолчанию
Линия и две кнопки sm в SectionFooterActions, прижатые к концу ряда.
vue
<script setup lang="ts">
import {
Button,
SectionFooter,
SectionFooterActions,
SectionFooterContent,
SectionFooterDivider,
} from '@prosper/ui'
</script>
<template>
<SectionFooter style="inline-size: 100%">
<SectionFooterDivider />
<SectionFooterContent>
<SectionFooterActions>
<Button variant="secondary" size="sm">Отмена</Button>
<Button size="sm">Сохранить</Button>
</SectionFooterActions>
</SectionFooterContent>
</SectionFooter>
</template>С группой кнопок
ButtonGroup размера sm и ссылка-кнопка link-gray стоят в SectionFooterContent перед действиями.
vue
<script setup lang="ts">
import { ref } from 'vue'
import {
Button,
ButtonGroup,
ButtonGroupItem,
SectionFooter,
SectionFooterActions,
SectionFooterContent,
SectionFooterDivider,
} from '@prosper/ui'
const periods = ['12 месяцев', '30 дней', '7 дней'] as const
const period = ref<(typeof periods)[number]>('12 месяцев')
</script>
<template>
<SectionFooter style="inline-size: 100%">
<SectionFooterDivider />
<SectionFooterContent>
<ButtonGroup size="sm" aria-label="Период отчёта">
<ButtonGroupItem
v-for="item in periods"
:key="item"
:current="period === item"
@click="period = item"
>
{{ item }}
</ButtonGroupItem>
</ButtonGroup>
<Button variant="link-gray" size="sm">Подробнее</Button>
<SectionFooterActions>
<Button variant="secondary" size="sm">Полный отчёт</Button>
</SectionFooterActions>
</SectionFooterContent>
</SectionFooter>
</template>Без линии
Одна ссылка-кнопка в SectionFooterContent: без SectionFooterDivider подвал состоит из одного ряда.
vue
<script setup lang="ts">
import { Button, SectionFooter, SectionFooterContent } from '@prosper/ui'
</script>
<template>
<SectionFooter style="inline-size: 100%">
<SectionFooterContent>
<Button variant="link-gray" size="sm">Смотреть все</Button>
</SectionFooterContent>
</SectionFooter>
</template>Узкий экран
Пример стоит в QueryContainer шириной 343 px.
vue
<script setup lang="ts">
import {
Button,
QueryContainer,
SectionFooter,
SectionFooterActions,
SectionFooterContent,
SectionFooterDivider,
} from '@prosper/ui'
</script>
<template>
<QueryContainer style="inline-size: 343px">
<SectionFooter>
<SectionFooterDivider />
<SectionFooterContent>
<SectionFooterActions class="actions">
<Button variant="secondary" size="sm">Отмена</Button>
<Button size="sm">Сохранить изменения профиля</Button>
</SectionFooterActions>
</SectionFooterContent>
</SectionFooter>
</QueryContainer>
</template>
<style scoped>
@container prosper (width < 40rem) {
.actions {
flex-direction: column;
}
}
</style>API
SectionFooter
Корень подвала раздела: колонка без отступов, фона и рамки, в которой части идут сверху вниз с промежутком 20 px.
Слоты
| Имя | Тип | Описание |
|---|---|---|
default | {} | SectionFooterDivider и SectionFooterContent. |
SectionFooterDivider
Тонкая линия на всю ширину корня, обычно первая часть.
Пропсов, событий и слотов нет.
SectionFooterContent
Ряд со ссылкой и группой кнопок в начале, элементы которого переносятся и выравниваются по центру.
Слоты
| Имя | Тип | Описание |
|---|---|---|
default | {} | Ссылка-кнопка, ButtonGroup и SectionFooterActions. |
SectionFooterActions
Ряд кнопок действий, который занимает свободную ширину и прижимает кнопки к концу с промежутком 12 px.
Слоты
| Имя | Тип | Описание |
|---|---|---|
default | {} | Кнопки действий. |
Доступность
- Корень и части не задают атрибут
role. - Линия декоративная и скрыта от вспомогательных технологий.
- Элемент
footerвокруг подвала раздела ставит потребитель: подвал страницы это неSectionFooter.