import * as React from 'react'; import { DetailsList, buildColumns, IColumn, mergeStyleSets, HoverCard, IExpandingCardProps, ThemeProvider, } from '@fluentui/react'; import { createListItems, IExampleItem } from '@fluentui/example-data'; const classNames = mergeStyleSets({ compactCard: { display: 'flex', alignItems: 'center', justifyContent: 'center', height: '100%', }, expandedCard: { padding: '16px 24px', }, item: { selectors: { '&:hover': { textDecoration: 'underline', cursor: 'pointer', }, }, }, }); const items: IExampleItem[] = createListItems(10); const buildColumn = (): IColumn[] => { return buildColumns(items).filter(column => column.name === 'location' || column.name === 'key'); }; const onRenderCompactCard = (item: IExampleItem): JSX.Element => { return (
); }; const columns: IColumn[] = buildColumn(); const onRenderExpandedCard = (item: IExampleItem): JSX.Element => { return (Hover over the location cell of a row item to see the card or use the keyboard to navigate to it.
When using the keyboard to tab to it, the card will open but navigation inside of it will not be available.