19 lines
766 B
JavaScript
19 lines
766 B
JavaScript
import { html } from 'htm/preact'
|
|
import { Icon } from '#tofu/components/atoms/Icon.js'
|
|
|
|
// Previous / next week. Each button carries an icon AND a visually hidden name:
|
|
// an icon alone has no accessible name.
|
|
export function WeekNavigation({ onPrevious, onNext }) {
|
|
return html`
|
|
<nav class="week-nav" aria-label="Navigation par semaine">
|
|
<button type="button" class="week-nav-button" onClick=${() => onPrevious()}>
|
|
<${Icon} name="chevron-left" />
|
|
<span class="visually-hidden">Semaine précédente</span>
|
|
</button>
|
|
<button type="button" class="week-nav-button" onClick=${() => onNext()}>
|
|
<${Icon} name="chevron-right" />
|
|
<span class="visually-hidden">Semaine suivante</span>
|
|
</button>
|
|
</nav>
|
|
`
|
|
}
|