antd APIs
- Button
- Input
- Modal
- Form
- message
- Row
- Tooltip
- Select
- Menu
- Col
- Spin
- Table
- Dropdown
- Card
- Switch
- Checkbox
- Space
- Tag
- Radio
- Tabs
- Typography
- Divider
- InputNumber
- Popover
- Alert
- Layout
- DatePicker
- List
- Collapse
- Avatar
- ConfigProvider
- notification
- Drawer
- Empty
- Badge
- Result
- Popconfirm
- Upload
- AutoComplete
- Progress
- Skeleton
- Image
- Tree
- Breadcrumb
- Slider
- FormInstance
- Descriptions
- Pagination
- PageHeader
- ButtonProps
- Statistic
- Steps
- FormItemProps
- TreeSelect
- Anchor
- Icon
- RadioChangeEvent
- TimePicker
- SelectProps
- Cascader
- ModalProps
- Affix
- TableProps
- Rate
- MenuProps
- InputProps
- Transfer
- FormProps
- MenuItemProps
- TooltipProps
- UploadProps
- PopoverProps
- Timeline
- Carousel
- CheckboxProps
- Mentions
- CardProps
- SpinProps
- InputNumberProps
- SubMenuProps
- Comment
- CascaderProps
- DatePickerProps
- SliderSingleProps
- TreeSelectProps
- RadioProps
- Grid
- Calendar
- AlertProps
- PaginationProps
- DropDownProps
- ColProps
- TableColumnsType
- LocaleProvider
- LayoutProps
- AutoCompleteProps
- RateProps
- MentionProps
- SwitchProps
- TimePickerProps
- AnchorProps
- TablePaginationConfig
- MessageArgsProps
- TabsProps
- CarouselProps
- RadioGroupProps
- RowProps
- BackTop
- ModalFuncProps
- InputRef
- AvatarProps
- TreeDataNode
- TableColumnProps
- TableColumnType
- TreeNodeProps
Other Related APIs
antd#AlertProps TypeScript Examples
The following examples show how to use
antd#AlertProps.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.test.tsx From erda-ui with GNU Affero General Public License v3.0 | 6 votes |
jest.mock('antd', () => {
// eslint-disable-next-line @typescript-eslint/no-shadow
const React = require('react');
// eslint-disable-next-line @typescript-eslint/no-shadow
const antd = jest.requireActual('antd');
const OriginAlert = antd.Alert;
const Alert: React.FC<AlertProps> = (props) => {
const close: AlertProps['onClose'] = (...arg) => {
props.onClose?.(...arg);
setTimeout(() => {
props.afterClose?.();
}, 100);
};
return <OriginAlert onClose={close} {...props} />;
};
return {
...antd,
Alert,
};
});