()
| 1 | import { Box, Image, Mask, Table, Text } from 'gestalt'; |
| 2 | |
| 3 | export default function Example() { |
| 4 | return ( |
| 5 | <Box alignItems="center" display="flex" height="100%" justifyContent="center" padding={8}> |
| 6 | <Box width="60%"> |
| 7 | <Table |
| 8 | accessibilityLabel="Sticky header and sticky columns" |
| 9 | borderStyle="none" |
| 10 | maxHeight={200} |
| 11 | stickyColumns={3} |
| 12 | > |
| 13 | <Table.Header sticky> |
| 14 | <Table.Row> |
| 15 | <Table.HeaderCell> |
| 16 | <Text weight="bold">Image</Text> |
| 17 | </Table.HeaderCell> |
| 18 | <Table.HeaderCell> |
| 19 | <Text weight="bold">Name</Text> |
| 20 | </Table.HeaderCell> |
| 21 | <Table.HeaderCell> |
| 22 | <Text weight="bold">Super Name</Text> |
| 23 | </Table.HeaderCell> |
| 24 | <Table.HeaderCell> |
| 25 | <Text weight="bold">Best Friend</Text> |
| 26 | </Table.HeaderCell> |
| 27 | <Table.HeaderCell> |
| 28 | <Text weight="bold">Favorite Food</Text> |
| 29 | </Table.HeaderCell> |
| 30 | <Table.HeaderCell> |
| 31 | <Text weight="bold">Super Powers</Text> |
| 32 | </Table.HeaderCell> |
| 33 | <Table.HeaderCell> |
| 34 | <Text weight="bold">Home</Text> |
| 35 | </Table.HeaderCell> |
| 36 | <Table.HeaderCell> |
| 37 | <Text weight="bold">Aliases</Text> |
| 38 | </Table.HeaderCell> |
| 39 | </Table.Row> |
| 40 | </Table.Header> |
| 41 | |
| 42 | <Table.Body> |
| 43 | <Table.Row> |
| 44 | <Table.Cell> |
| 45 | <Box width={50}> |
| 46 | <Mask rounding="circle"> |
| 47 | <Image |
| 48 | alt="Tony" |
| 49 | naturalHeight={50} |
| 50 | naturalWidth={50} |
| 51 | src="https://i.ibb.co/r3R04Y9/ironman.jpg" |
| 52 | /> |
| 53 | </Mask> |
| 54 | </Box> |
| 55 | </Table.Cell> |
| 56 | <Table.Cell> |
| 57 | <Text>Tony Stark</Text> |
| 58 | </Table.Cell> |
| 59 | <Table.Cell> |
| 60 | <Text>Iron Man</Text> |
nothing calls this directly
no outgoing calls
no test coverage detected