import {Fragment} from 'react'; import styled from '@emotion/styled'; import BulkController from 'sentry/components/bulkController'; import Checkbox from 'sentry/components/checkbox'; import {PanelTable} from 'sentry/components/panels'; const dummy = [ { id: 1, text: 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Accusantium autem placeat corrupti sapiente optio. Sapiente, aut exercitationem nisi nesciunt molestiae perspiciatis ad illo at officiis porro quam voluptas explicabo quod.', }, { id: 2, text: 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Accusantium autem placeat corrupti sapiente optio. Sapiente, aut exercitationem nisi nesciunt molestiae perspiciatis ad illo at officiis porro quam voluptas explicabo quod.', }, { id: 3, text: 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Accusantium autem placeat corrupti sapiente optio. Sapiente, aut exercitationem nisi nesciunt molestiae perspiciatis ad illo at officiis porro quam voluptas explicabo quod.', }, { id: 4, text: 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Accusantium autem placeat corrupti sapiente optio. Sapiente, aut exercitationem nisi nesciunt molestiae perspiciatis ad illo at officiis porro quam voluptas explicabo quod.', }, { id: 5, text: 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Accusantium autem placeat corrupti sapiente optio. Sapiente, aut exercitationem nisi nesciunt molestiae perspiciatis ad illo at officiis porro quam voluptas explicabo quod.', }, ]; const pageIds = dummy.map(d => d.id); export default { title: 'Components/Tables/BulkController', component: BulkController, }; export const _BulkController = () => ( {({selectedIds, onPageRowsToggle, onRowToggle, isPageSelected, renderBulkNotice}) => ( onPageRowsToggle(e.target.checked)} />, 'Id', 'Text', ]} > {renderBulkNotice()} {dummy.map(d => (
onRowToggle(d.id)} />
{d.id}
{d.text}
))}
)}
); _BulkController.storyName = 'BulkController'; _BulkController.parameters = { docs: { description: { story: 'Nearly empty state will still show 1 bar if there are any miserable users', }, }, }; const StyledCheckbox = styled(Checkbox)` margin-top: 0 !important; `;