Skip to content

Commit

Permalink
feat: add types to TableBatchAction (#15065)
Browse files Browse the repository at this point in the history
Co-authored-by: Taylor Jones <[email protected]>
  • Loading branch information
Tresau and tay1orjones authored Oct 31, 2023
1 parent 8ef1a52 commit 2c5f6ef
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,25 @@ import React from 'react';
import { AddFilled as iconAddSolid } from '@carbon/icons-react';
import Button from '../Button';

export interface TableBatchActionProps
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
/**
* Specify if the button is an icon-only button
*/
hasIconOnly?: boolean;

/**
* If specifying the `renderIcon` prop, provide a description for that icon that can
* be read by screen readers
*/
iconDescription?: string;

/**
* Optional function to render your own icon in the underlying button
*/
renderIcon?: React.ElementType;
}

const TableBatchAction = ({
renderIcon = iconAddSolid,
iconDescription = 'Add',
Expand Down

0 comments on commit 2c5f6ef

Please sign in to comment.