@hubspot/ui-extensions 0.7.3 → 0.8.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/README.md +8 -1
- package/dist/types.d.ts +1092 -23
- package/dist/types.js +3 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1830,14 +1830,21 @@ interface TableHeaderProps {
|
|
|
1830
1830
|
children: ReactNode;
|
|
1831
1831
|
width?: 'min' | 'max' | 'auto' | number;
|
|
1832
1832
|
align?: 'left' | 'center' | 'right';
|
|
1833
|
+
sortDirection?: 'ascending' | 'descending' | 'none';
|
|
1834
|
+
onSortChange?: (value: 'ascending' | 'descending') => void;
|
|
1835
|
+
disabled?: boolean;
|
|
1833
1836
|
}
|
|
1834
1837
|
```
|
|
1835
1838
|
|
|
1836
1839
|
| Prop | Type | Default | Description |
|
|
1837
1840
|
| --- | --- | --- | --- |
|
|
1838
1841
|
| `children` | `ReactNode` | `N/A` | Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components. |
|
|
1839
|
-
| `width` | `'min' \| 'max' \| 'auto' \| 'large'` | `'auto'` | Sets the width of a table header |
|
|
1842
|
+
| `width` | `'min' \| 'max' \| 'auto' \| 'large'` | `'auto'` | Sets the width of a table header. |
|
|
1840
1843
|
| `align` | `'left' \| 'center' \| 'right'` | `'left'` | Sets the alignment of a table header |
|
|
1844
|
+
| `sortDirection` | `'ascending' \| 'descending' \| 'none'` | `'N/A'` | Sets the current direction in which the column is sorted (if any). It's a visual indicator, it doesn't modify the data. |
|
|
1845
|
+
| `disabled` | `boolean(optional)` | `false` | If `true`, users cannot change the sort ordering. It has no effect if sort=`never` or `undefined`. |
|
|
1846
|
+
| `onSortChange` | `(value: 'ascending' | 'descending') => void(optional)` | `N/A` | A callback function that is invoked when the header is clicked. It recieves the new sort direction as an argument. It's required when sort = `ascending`, `descending` or `none`. |
|
|
1847
|
+
|
|
1841
1848
|
##### Usage
|
|
1842
1849
|
|
|
1843
1850
|
```javascript
|