MCPcopy
hub / github.com/primer/react / WithActionsOnly

Function WithActionsOnly

packages/react/src/DataTable/DataTable.features.stories.tsx:613–676  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

611)
612
613export const WithActionsOnly = () => (
614 <>
615 <Heading as="h2" id="table-title">
616 Repositories
617 </Heading>
618 <Table.Container>
619 <Table.Actions>
620 <IconButton aria-label="Download" icon={DownloadIcon} variant="invisible" />
621 <IconButton aria-label="Add row" icon={PlusIcon} variant="invisible" />
622 </Table.Actions>
623 <DataTable
624 aria-labelledby="table-title"
625 data={data}
626 columns={[
627 {
628 header: 'Repository',
629 field: 'name',
630 rowHeader: true,
631 },
632 {
633 header: 'Type',
634 field: 'type',
635 renderCell: row => {
636 return <Label>{uppercase(row.type)}</Label>
637 },
638 },
639 {
640 header: 'Updated',
641 field: 'updatedAt',
642 renderCell: row => {
643 return <RelativeTime date={new Date(row.updatedAt)} />
644 },
645 },
646 {
647 header: 'Dependabot',
648 field: 'securityFeatures.dependabot',
649 renderCell: row => {
650 return row.securityFeatures.dependabot.length > 0 ? (
651 <LabelGroup>
652 {row.securityFeatures.dependabot.map(feature => {
653 return <Label key={feature}>{uppercase(feature)}</Label>
654 })}
655 </LabelGroup>
656 ) : null
657 },
658 },
659 {
660 header: 'Code scanning',
661 field: 'securityFeatures.codeScanning',
662 renderCell: row => {
663 return row.securityFeatures.codeScanning.length > 0 ? (
664 <LabelGroup>
665 {row.securityFeatures.codeScanning.map(feature => {
666 return <Label key={feature}>{uppercase(feature)}</Label>
667 })}
668 </LabelGroup>
669 ) : null
670 },

Callers

nothing calls this directly

Calls 1

uppercaseFunction · 0.70

Tested by

no test coverage detected