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

Function WithActionOnly

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

Source from the content-addressed store, hash-verified

479)
480
481export const WithActionOnly = () => (
482 <>
483 <Heading as="h2" id="table-title">
484 Repositories
485 </Heading>
486 <Table.Container>
487 <Table.Actions>
488 <Button>Action</Button>
489 </Table.Actions>
490 <DataTable
491 aria-labelledby="table-title"
492 data={data}
493 columns={[
494 {
495 header: 'Repository',
496 field: 'name',
497 rowHeader: true,
498 },
499 {
500 header: 'Type',
501 field: 'type',
502 renderCell: row => {
503 return <Label>{uppercase(row.type)}</Label>
504 },
505 },
506 {
507 header: 'Updated',
508 field: 'updatedAt',
509 renderCell: row => {
510 return <RelativeTime date={new Date(row.updatedAt)} />
511 },
512 },
513 {
514 header: 'Dependabot',
515 field: 'securityFeatures.dependabot',
516 renderCell: row => {
517 return row.securityFeatures.dependabot.length > 0 ? (
518 <LabelGroup>
519 {row.securityFeatures.dependabot.map(feature => {
520 return <Label key={feature}>{uppercase(feature)}</Label>
521 })}
522 </LabelGroup>
523 ) : null
524 },
525 },
526 {
527 header: 'Code scanning',
528 field: 'securityFeatures.codeScanning',
529 renderCell: row => {
530 return row.securityFeatures.codeScanning.length > 0 ? (
531 <LabelGroup>
532 {row.securityFeatures.codeScanning.map(feature => {
533 return <Label key={feature}>{uppercase(feature)}</Label>
534 })}
535 </LabelGroup>
536 ) : null
537 },
538 },

Callers

nothing calls this directly

Calls 1

uppercaseFunction · 0.70

Tested by

no test coverage detected