Browse Source

Merge #343

343: All tooltips to action icons in CfdTable r=klochowicz a=klochowicz

It makes it a bit easier to use, especially for newcomers

Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
testing
bors[bot] 3 years ago
committed by GitHub
parent
commit
45c0db34db
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      frontend/src/components/cfdtables/CfdTable.tsx

7
frontend/src/components/cfdtables/CfdTable.tsx

@ -22,6 +22,7 @@ import {
Td, Td,
Th, Th,
Thead, Thead,
Tooltip,
Tr, Tr,
useToast, useToast,
VStack, VStack,
@ -179,14 +180,16 @@ export function CfdTable(
Header: "Action", Header: "Action",
accessor: ({ actions, order_id }) => { accessor: ({ actions, order_id }) => {
const actionIcons = actions.map((action) => { const actionIcons = actions.map((action) => {
return (<IconButton return (<Tooltip label={action}>
<IconButton
key={action} key={action}
colorScheme={colorSchemaForAction(action)} colorScheme={colorSchemaForAction(action)}
aria-label={action} aria-label={action}
icon={iconForAction(action)} icon={iconForAction(action)}
onClick={() => postAction(order_id, action)} onClick={() => postAction(order_id, action)}
isLoading={isActioning} isLoading={isActioning}
/>); />
</Tooltip>);
}); });
return <HStack>{actionIcons}</HStack>; return <HStack>{actionIcons}</HStack>;

Loading…
Cancel
Save