import { Canvas, Meta, ArgTypes } from '@storybook/blocks'; import { ThemeProvider } from 'styled-components'; import RosterCell from './RosterCell'; import RosterGroup from './RosterGroup'; import RosterHeader from './RosterHeader'; import Roster from './'; import Flex from '../Flex'; import { lightTheme } from '../../../theme/'; import { GlobalStyles } from '../../../theme/GlobalStyles'; import * as RosterStories from './Roster.stories.tsx'; # Roster The Roster component displays all the attendees in a meeting including their local statuses for audio, video, content share and if running late. It is made up of one RosterHeader component and multiple RosterGroup components. RosterHeaders and RosterCells support tooltips on any buttons by adding a `data-tooltip` property. Adding a `data-tooltip-position` property controls the tooltip position. - The RosterHeader will use the labels supplied for the tooltip text - The RosterCell will render the `a11yMenuLabel` as the tooltip text ## Importing ```javascript import { Roster, RosterGroup, RosterHeader, RosterCell } from 'amazon-chime-sdk-component-library-react'; ``` ## Example {}} searchValue="Michael" onSearch={() => {}} /> ```jsx {}} searchValue="Michael" onSearch={() => {}} /> ``` # RosterHeader The RosterHeader component displays the title of the Roster's header and number of attendees. It is equipped with the search functionality and close icon button to close the roster itself. Additionally, custom elements can be rendered into the RosterHeader via the 'children' prop. ## Example {}} searchValue="Michael" onSearch={() => {}} /> ```jsx {}} searchValue="Michael" onSearch={() => {}} /> ``` ### RosterHeader Props # RosterGroup The RosterGroup component displays multiple RosterCell components grouped by a category. The title distinguishes the RosterGroup category. ## Example ```jsx ``` ### RosterGroup Props # RosterCell The RosterCell component displays a single row in the Roster component providing various statuses for an attendee in a meeting. In a meeting, the RosterCell shows the current status of audio, video and presence of an attendee with the attendee name. One can also show running late messages as well as a subtitle for the attendee. ## Example RosterCell Component with the `running late` message ```jsx ``` RosterCell Component with `micPosition leading` ```jsx ``` RosterCell Component with `micPosition grouped` ```jsx ``` ### RosterCell Props