@bitrise/bitkit 12.115.0 → 12.116.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit",
3
3
  "description": "Bitrise React component library",
4
- "version": "12.115.0",
4
+ "version": "12.116.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+ssh://git@github.com/bitrise-io/bitkit.git"
@@ -1,11 +1,13 @@
1
1
  import { forwardRef, TableCellProps as ChakraTableCellProps, Td as ChakraTd } from '@chakra-ui/react';
2
2
 
3
3
  export interface TableCellProps extends ChakraTableCellProps {
4
+ isNumeric?: boolean;
4
5
  variant?: 'default' | 'separator';
5
6
  }
6
7
 
7
8
  const Td = forwardRef<TableCellProps, 'td'>((props, ref) => {
8
- return <ChakraTd role="cell" {...props} ref={ref} />;
9
+ const { isNumeric, ...rest } = props;
10
+ return <ChakraTd role="cell" textAlign={isNumeric ? 'right' : 'left'} {...rest} ref={ref} />;
9
11
  });
10
12
 
11
13
  export default Td;
@@ -69,6 +69,8 @@ const Th = forwardRef<TableColumnHeaderProps, 'th'>((props, ref) => {
69
69
  <Icon name="Sort" sx={css.sortIcon} />
70
70
  </Box>
71
71
  );
72
+ } else if (isNumeric) {
73
+ properties.textAlign = 'right';
72
74
  }
73
75
 
74
76
  return <ChakraTh {...properties} ref={ref} />;