import * as React from 'react'; import { Carousel, Image } from '@fluentui/react-northstar'; const imageAltTags = { ade: 'Portrait of Ade', elliot: 'Portrait of Elliot', molly: 'Portrait of Molly', nan: 'Portrait of Nan', }; const carouselItems = [ { key: 'ade', id: 'ade', content: {imageAltTags.ade}, thumbnail: {imageAltTags.ade}, 'aria-label': imageAltTags.ade, }, { key: 'elliot', id: 'elliot', content: {imageAltTags.elliot}, thumbnail: {imageAltTags.elliot}, 'aria-label': imageAltTags.elliot, }, { key: 'molly', id: 'molly', content: {imageAltTags.molly}, thumbnail: {imageAltTags.molly}, 'aria-label': imageAltTags.molly, }, { key: 'nan', id: 'nan', content: {imageAltTags.nan}, thumbnail: {imageAltTags.nan}, 'aria-label': imageAltTags.nan, }, { key: 'elliot1', id: 'elliot1', content: {imageAltTags.elliot}, thumbnail: {imageAltTags.elliot}, 'aria-label': imageAltTags.elliot, }, { key: 'ade1', id: 'ade1', content: {imageAltTags.ade}, thumbnail: {imageAltTags.ade}, 'aria-label': imageAltTags.ade, }, ]; const CarouselExample = () => ( ({ key: index, 'aria-controls': item.id, 'aria-label': item['aria-label'], content: item.thumbnail, })), }} items={carouselItems} getItemPositionText={(index: number, size: number) => `${index + 1} of ${size}`} /> ); export default CarouselExample;