@dxos/react-ui-list 0.8.0 → 0.8.1-main.a06ad20

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.
@@ -202,13 +202,14 @@ export const ListItemDeleteButton = ({
202
202
  autoHide = true,
203
203
  classNames,
204
204
  disabled,
205
+ icon = 'ph--x--regular',
205
206
  ...props
206
- }: Omit<IconButtonProps, 'icon'> & { autoHide?: boolean }) => {
207
+ }: Partial<Pick<IconButtonProps, 'icon'>> & Omit<IconButtonProps, 'icon'> & { autoHide?: boolean }) => {
207
208
  const { state } = useListContext('DELETE_BUTTON');
208
209
  const isDisabled = state.type !== 'idle' || disabled;
209
210
  return (
210
211
  <IconButton
211
- icon='ph--x--regular'
212
+ icon={icon}
212
213
  disabled={isDisabled}
213
214
  classNames={[classNames, autoHide && disabled && 'hidden']}
214
215
  {...props}
@@ -216,6 +217,17 @@ export const ListItemDeleteButton = ({
216
217
  );
217
218
  };
218
219
 
220
+ export const ListItemButton = ({
221
+ autoHide = true,
222
+ classNames,
223
+ disabled,
224
+ ...props
225
+ }: IconButtonProps & { autoHide?: boolean }) => {
226
+ const { state } = useListContext('ITEM_BUTTON');
227
+ const isDisabled = state.type !== 'idle' || disabled;
228
+ return <IconButton disabled={isDisabled} classNames={[classNames, autoHide && disabled && 'hidden']} {...props} />;
229
+ };
230
+
219
231
  export const ListItemDragHandle = () => {
220
232
  const { dragHandleRef } = useListItemContext('DRAG_HANDLE');
221
233
  return <IconButton ref={dragHandleRef as any} icon='ph--dots-six-vertical--regular' />;