@ant-design/icons APIs
- DeleteOutlined
- PlusOutlined
- SettingOutlined
- UserOutlined
- ExclamationCircleOutlined
- CloseOutlined
- DownOutlined
- SearchOutlined
- EditOutlined
- QuestionCircleOutlined
- LoadingOutlined
- CopyOutlined
- DownloadOutlined
- LogoutOutlined
- LeftOutlined
- PlusCircleOutlined
- MinusCircleOutlined
- CloseCircleOutlined
- CheckOutlined
- UploadOutlined
- ReloadOutlined
- InfoCircleOutlined
- SaveOutlined
- GithubOutlined
- LockOutlined
- RightOutlined
- CodeOutlined
- EyeOutlined
- EllipsisOutlined
- CaretRightOutlined
- CheckCircleOutlined
- SyncOutlined
- LinkOutlined
- HomeOutlined
- MenuUnfoldOutlined
- FullscreenExitOutlined
- FullscreenOutlined
- MenuOutlined
- BellOutlined
- MenuFoldOutlined
- AppstoreOutlined
- FormOutlined
- CaretDownOutlined
- UndoOutlined
- TeamOutlined
- ArrowDownOutlined
- ArrowLeftOutlined
- ClearOutlined
- RedoOutlined
- GlobalOutlined
- ExportOutlined
- ClockCircleOutlined
- PlayCircleOutlined
- MoreOutlined
- UpOutlined
- UnorderedListOutlined
- MessageOutlined
- ArrowUpOutlined
- FilterOutlined
- StarOutlined
- StopOutlined
- EyeInvisibleOutlined
- BgColorsOutlined
- WarningOutlined
- createFromIconfontCN
- MailOutlined
- ArrowRightOutlined
- AreaChartOutlined
- SendOutlined
- DatabaseOutlined
- CalendarOutlined
- VerticalAlignBottomOutlined
- PictureOutlined
- ProfileOutlined
- FileTextOutlined
- DeploymentUnitOutlined
- QuestionOutlined
- UserAddOutlined
- ApiOutlined
- AppstoreAddOutlined
- RollbackOutlined
- BoldOutlined
- ItalicOutlined
- UnderlineOutlined
- VerticalAlignTopOutlined
- SnippetsOutlined
- HighlightOutlined
- WeiboCircleOutlined
- ApartmentOutlined
- BugOutlined
- DashboardOutlined
- HistoryOutlined
- CloseCircleFilled
- SmileOutlined
- BarsOutlined
- InfoOutlined
- PhoneOutlined
- BarChartOutlined
- LineChartOutlined
- PieChartOutlined
- CommentOutlined
- UsergroupAddOutlined
- ExclamationCircleFilled
- ControlOutlined
- GoogleOutlined
- InboxOutlined
- ShareAltOutlined
- ReadOutlined
- CheckCircleFilled
- BlockOutlined
- NotificationOutlined
- DesktopOutlined
- FileOutlined
- MinusOutlined
- FieldTimeOutlined
- PlusSquareOutlined
- DiffOutlined
- AlignCenterOutlined
- ZoomInOutlined
- ZoomOutOutlined
- AlipayCircleOutlined
- FileAddOutlined
- FolderAddOutlined
- FolderOpenOutlined
- NumberOutlined
- PauseOutlined
- ContactsOutlined
- CloudSyncOutlined
- TableOutlined
- ContainerOutlined
- TagOutlined
- VideoCameraOutlined
- BookOutlined
- ToolOutlined
- SlackOutlined
- MobileOutlined
- SwapOutlined
- LockFilled
- CloudDownloadOutlined
- StarFilled
- FontSizeOutlined
- BranchesOutlined
- UpCircleOutlined
- DownCircleOutlined
- DoubleRightOutlined
- MinusSquareOutlined
- AlignLeftOutlined
- AlignRightOutlined
- SmallDashOutlined
- TaobaoCircleOutlined
- BuildOutlined
- CloudUploadOutlined
- FolderOutlined
- GroupOutlined
- Loading3QuartersOutlined
- QrcodeOutlined
- FolderFilled
- InfoCircleFilled
- PlusCircleFilled
- SmileTwoTone
- HeartTwoTone
- CheckCircleTwoTone
- EditFilled
- UserDeleteOutlined
- MacCommandOutlined
- PushpinOutlined
- CoffeeOutlined
- ProjectOutlined
- OrderedListOutlined
- FundOutlined
- RiseOutlined
- AimOutlined
- CalculatorOutlined
- GatewayOutlined
- KeyOutlined
- GitlabOutlined
- BulbOutlined
- CloseSquareOutlined
- PlaySquareOutlined
- RocketOutlined
- ClusterOutlined
- ArrowsAltOutlined
- DragOutlined
- CaretUpOutlined
- DoubleLeftOutlined
- EnterOutlined
- RetweetOutlined
- ScissorOutlined
- StrikethroughOutlined
- ColumnWidthOutlined
- DingdingOutlined
- TwitterOutlined
- QqOutlined
- ZhihuOutlined
- BorderOutlined
- CameraOutlined
- EnvironmentOutlined
- FieldNumberOutlined
- FileExcelOutlined
- FileImageOutlined
- FilePptOutlined
- FileSearchOutlined
- FormatPainterOutlined
- FunctionOutlined
- HourglassOutlined
- LayoutOutlined
- OneToOneOutlined
- PartitionOutlined
- PoweroffOutlined
- PrinterOutlined
- SafetyCertificateOutlined
- SolutionOutlined
- TagsOutlined
- UngroupOutlined
- CopyFilled
- DeleteTwoTone
- QuestionCircleFilled
- StepBackwardOutlined
- StepForwardOutlined
- CopyrightOutlined
- CrownOutlined
- ExclamationOutlined
- PaperClipOutlined
- DashOutlined
- CloseCircleTwoTone
- ExclamationCircleTwoTone
- FlagOutlined
- FunnelPlotOutlined
- InteractionOutlined
- CheckSquareOutlined
- LaptopOutlined
- CustomerServiceOutlined
- WarningFilled
- ApiTwoTone
- ApiFilled
- MergeCellsOutlined
- SlackSquareOutlined
- FallOutlined
- PercentageOutlined
- DollarOutlined
- CloudServerOutlined
- UnlockOutlined
- PicCenterOutlined
- FontColorsOutlined
- GithubFilled
- CaretLeftOutlined
- LeftCircleOutlined
- RightCircleOutlined
- VerticalAlignMiddleOutlined
- BackwardOutlined
- SwapRightOutlined
- LoginOutlined
- BorderBottomOutlined
- BorderLeftOutlined
- BorderRightOutlined
- BorderTopOutlined
- RadiusBottomleftOutlined
- RadiusBottomrightOutlined
- RadiusUpleftOutlined
- RadiusUprightOutlined
- PauseCircleOutlined
- IssuesCloseOutlined
- SortAscendingOutlined
- SortDescendingOutlined
- RadiusSettingOutlined
- ColumnHeightOutlined
- RadarChartOutlined
- BoxPlotOutlined
- WindowsOutlined
- WeiboOutlined
- WechatOutlined
- FacebookOutlined
- CodepenCircleOutlined
- AntDesignOutlined
- AliyunOutlined
- InstagramOutlined
- YuqueOutlined
- RedditOutlined
- AlertOutlined
- AudioOutlined
- AuditOutlined
- BankOutlined
- CompressOutlined
- ConsoleSqlOutlined
- CopyrightCircleOutlined
- CreditCardOutlined
- DeleteRowOutlined
- DisconnectOutlined
- ExceptionOutlined
- ExpandOutlined
- ExperimentOutlined
- FieldStringOutlined
- FileDoneOutlined
- FileProtectOutlined
- FileUnknownOutlined
- FireOutlined
- FolderViewOutlined
- FrownOutlined
- FundProjectionScreenOutlined
- FundViewOutlined
- GoldOutlined
- HddOutlined
- HeartOutlined
- InsertRowBelowOutlined
- InsertRowLeftOutlined
- LikeOutlined
- LineOutlined
- MonitorOutlined
- NodeIndexOutlined
- RotateRightOutlined
- SafetyOutlined
- SelectOutlined
- SisternodeOutlined
- SkinOutlined
- SubnodeOutlined
- SwitcherOutlined
- ThunderboltOutlined
- UserSwitchOutlined
- WalletOutlined
- FolderOpenFilled
- ProfileFilled
- HomeFilled
- DatabaseFilled
- PictureFilled
- LockTwoTone
- MailTwoTone
- MobileTwoTone
- ThunderboltFilled
- RobotFilled
- RestFilled
- DeleteFilled
- BankFilled
- SoundFilled
- CaretRightFilled
- QuestionCircleTwoTone
- SettingFilled
- EyeTwoTone
- ToolFilled
- CheckSquareFilled
- CloseSquareFilled
- RocketFilled
- PushpinFilled
- CrownFilled
- AppstoreFilled
- PlusCircleTwoTone
- AppleOutlined
- AndroidOutlined
- DropboxOutlined
- BehanceOutlined
- FastBackwardOutlined
- FastForwardOutlined
- ShrinkOutlined
- VerticalLeftOutlined
- VerticalRightOutlined
- ForwardOutlined
- SwapLeftOutlined
- UpSquareOutlined
- DownSquareOutlined
- LeftSquareOutlined
- RightSquareOutlined
- BorderHorizontalOutlined
- BorderInnerOutlined
- BorderOuterOutlined
- BorderVerticleOutlined
- PicLeftOutlined
- PicRightOutlined
- LineHeightOutlined
- DotChartOutlined
- HeatMapOutlined
- StockOutlined
- SlidersOutlined
- IeOutlined
- ChromeOutlined
- AliwangwangOutlined
- WeiboSquareOutlined
- Html5Outlined
- YoutubeOutlined
- TaobaoOutlined
- SkypeOutlined
- MediumWorkmarkOutlined
- MediumOutlined
- LinkedinOutlined
- GooglePlusOutlined
- CodepenOutlined
- CodeSandboxOutlined
- AmazonOutlined
- AlipayOutlined
- AntCloudOutlined
- BehanceSquareOutlined
- DribbbleOutlined
- DribbbleSquareOutlined
- AlibabaOutlined
- YahooOutlined
- SketchOutlined
- AccountBookOutlined
- AudioMutedOutlined
- BarcodeOutlined
- BorderlessTableOutlined
- CarOutlined
- CarryOutOutlined
- CiCircleOutlined
- CiOutlined
- CloudOutlined
- CompassOutlined
- DeleteColumnOutlined
- DeliveredProcedureOutlined
- DingtalkOutlined
- DislikeOutlined
- DollarCircleOutlined
- EuroCircleOutlined
- EuroOutlined
- ExpandAltOutlined
- FieldBinaryOutlined
- FileExclamationOutlined
- FileGifOutlined
- FileJpgOutlined
- FileMarkdownOutlined
- FilePdfOutlined
- FileSyncOutlined
- FileWordOutlined
- FileZipOutlined
- ForkOutlined
- GifOutlined
- GiftOutlined
- IdcardOutlined
- ImportOutlined
- InsertRowAboveOutlined
- InsertRowRightOutlined
- InsuranceOutlined
- ManOutlined
- MedicineBoxOutlined
- MehOutlined
- MoneyCollectOutlined
- NodeCollapseOutlined
- NodeExpandOutlined
- PayCircleOutlined
- PoundCircleOutlined
- PoundOutlined
- PropertySafetyOutlined
- PullRequestOutlined
- ReconciliationOutlined
- RedEnvelopeOutlined
- RestOutlined
- RobotOutlined
- RotateLeftOutlined
- ScanOutlined
- ScheduleOutlined
- SecurityScanOutlined
- ShakeOutlined
- ShopOutlined
- ShoppingCartOutlined
- ShoppingOutlined
- SoundOutlined
- SplitCellsOutlined
- TabletOutlined
- ToTopOutlined
- TrademarkCircleOutlined
- TrademarkOutlined
- TransactionOutlined
- TranslationOutlined
- TrophyOutlined
- UsbOutlined
- UsergroupDeleteOutlined
- VerifiedOutlined
- VideoCameraAddOutlined
- WhatsAppOutlined
- WifiOutlined
- WomanOutlined
- AlertFilled
- GoldenFilled
- MessageFilled
- BuildFilled
- PieChartFilled
- PlayCircleFilled
- StarTwoTone
- FacebookFilled
- CloudFilled
- NotificationFilled
- EyeFilled
- EyeInvisibleFilled
- SnippetsFilled
- HolderOutlined
- FilterFilled
- CreditCardFilled
- WechatFilled
- FilePdfFilled
- CaretDownFilled
- PlusSquareFilled
- TagsFilled
- BookFilled
- ContactsFilled
- TrophyTwoTone
- FundFilled
- WarningTwoTone
- SafetyCertificateFilled
- SaveFilled
- CodeFilled
- FolderAddFilled
- LinkedinFilled
- BellFilled
- FolderTwoTone
- CodeTwoTone
- DownCircleTwoTone
- UpCircleTwoTone
- ChromeFilled
- ThunderboltTwoTone
- PlaySquareTwoTone
- CompassTwoTone
Other Related APIs
@ant-design/icons#BuildFilled TypeScript Examples
The following examples show how to use
@ant-design/icons#BuildFilled.
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: BrickItem.spec.tsx From next-basics with GNU General Public License v3.0 | 4 votes |
describe("BrickItem", () => {
afterEach(() => {
jest.clearAllMocks();
});
it("should display a brick", () => {
const dragRef = jest.fn();
mockUseDrag.mockReturnValueOnce([{ isDragging: false }, dragRef]);
const mockOnDraggingChange = jest.fn();
const wrapper = mount(
<BrickItem
brick={{
type: "brick",
id: "my.awesome-brick",
title: "awesome-brick",
description: "My awesome brick",
}}
onDraggingChange={mockOnDraggingChange}
/>
);
expect(wrapper.find(".brickItem").hasClass("brick")).toBe(true);
expect(wrapper.find(".brickItem").prop("title")).toBe("My awesome brick");
expect(wrapper.find(BuildFilled).length).toBe(1);
expect(wrapper.find(".brickName").text()).toBe("awesome-brick");
expect(mockUseDrag).toBeCalledWith(
expect.objectContaining({
item: {
type: BuilderDataTransferType.NODE_TO_ADD,
brickType: undefined,
brick: "my.awesome-brick",
},
})
);
expect(mockOnDraggingChange).toBeCalledWith(false);
});
it("should display a provider", () => {
const dragRef = jest.fn();
mockUseDrag.mockReturnValueOnce([{ isDragging: false }, dragRef]);
const wrapper = shallow(
<BrickItem
brick={{
type: "provider",
id: "my.awesome-provider",
title: "awesome-provider",
}}
/>
);
expect(wrapper.find(".brickItem").hasClass("provider")).toBe(true);
expect(wrapper.find(".brickItem").prop("title")).toBe("awesome-provider");
expect(wrapper.find(DatabaseFilled).length).toBe(1);
expect(wrapper.find(".brickName").text()).toBe("awesome-provider");
expect(mockUseDrag).toBeCalledWith(
expect.objectContaining({
item: {
type: BuilderDataTransferType.NODE_TO_ADD,
brickType: "provider",
brick: "my.awesome-provider",
},
})
);
});
it("should display a legacy template", () => {
const dragRef = jest.fn();
mockUseDrag.mockReturnValueOnce([{ isDragging: false }, dragRef]);
const wrapper = shallow(
<BrickItem
brick={{
type: "template",
id: "my.awesome-template",
title: "awesome-template",
}}
/>
);
expect(wrapper.find(".brickItem").hasClass("template")).toBe(true);
expect(wrapper.find(GoldenFilled).length).toBe(1);
expect(wrapper.find(".brickName").text()).toBe("awesome-template");
expect(mockUseDrag).toBeCalledWith(
expect.objectContaining({
item: {
type: BuilderDataTransferType.NODE_TO_ADD,
brickType: "template",
brick: "my.awesome-template",
},
})
);
});
it("should display a custom template", () => {
const dragRef = jest.fn();
mockUseDrag.mockReturnValueOnce([{ isDragging: false }, dragRef]);
const wrapper = shallow(
<BrickItem
brick={{
type: "customTemplate",
id: "my.awesome-custom-template",
title: "awesome-custom-template",
}}
/>
);
expect(wrapper.find(".brickItem").hasClass("customTemplate")).toBe(true);
expect(wrapper.find(CopyFilled).length).toBe(1);
expect(wrapper.find(".brickName").text()).toBe("awesome-custom-template");
expect(mockUseDrag).toBeCalledWith(
expect.objectContaining({
item: {
type: BuilderDataTransferType.NODE_TO_ADD,
brickType: undefined,
brick: "my.awesome-custom-template",
},
})
);
});
it("should display a snippet", () => {
const dragRef = jest.fn();
mockUseDrag.mockReturnValueOnce([{ isDragging: false }, dragRef]);
const wrapper = shallow(
<BrickItem
brick={{
type: "snippet",
id: "my.snippet",
title: "My Snippet",
bricks: [
{
brick: "easy-view",
},
],
thumbnail: "test.svg",
}}
/>
);
expect(wrapper.find(".brickItem").hasClass("snippet")).toBe(true);
expect(wrapper.find(".brickIcon img").prop("src")).toBe("test.svg");
expect(wrapper.find(NumberOutlined).length).toBe(0);
expect(wrapper.find(".brickName").text()).toBe("My Snippet");
expect(mockUseDrag).toBeCalledWith(
expect.objectContaining({
item: {
type: BuilderDataTransferType.SNIPPET_TO_APPLY,
bricks: [
{
brick: "easy-view",
},
],
},
})
);
});
it("should display a snippet without thumbnail", () => {
const dragRef = jest.fn();
mockUseDrag.mockReturnValueOnce([{ isDragging: false }, dragRef]);
const wrapper = shallow(
<BrickItem
brick={{
type: "snippet",
id: "my.snippet",
title: "My Snippet",
bricks: [
{
brick: "easy-view",
},
],
}}
/>
);
expect(wrapper.find(".brickItem").hasClass("snippet")).toBe(true);
expect(wrapper.find(NumberOutlined).length).toBe(1);
expect(wrapper.find(".brickIcon img").length).toBe(0);
});
it("should render icon", () => {
const dragRef = jest.fn();
mockUseDrag.mockReturnValueOnce([{ isDragging: false }, dragRef]);
const wrapper = shallow(
<BrickItem
brick={{
category: "form-input",
icon: {
lib: "fa",
icon: "abacus",
},
type: "brick",
id: "my.awesome-brick",
title: "awesome-brick",
}}
/>
);
expect(wrapper.find(GeneralIcon).prop("icon")).toEqual({
icon: "abacus",
lib: "fa",
});
});
it("should show thumbnail while layerType was widget", () => {
const dragRef = jest.fn();
mockUseDrag.mockReturnValueOnce([{ isDragging: false }, dragRef]);
const wrapper = shallow(
<BrickItem
brick={{
type: "brick",
id: "widget-project.my-widget",
title: "my-widget",
thumbnail: "xxx.png",
}}
layerType={LayerType.WIDGET}
/>
);
expect(wrapper.find(".brickIcon img").prop("src")).toBe("xxx.png");
});
it("should show BuildFilled while layType was widget and thumbnail was null", () => {
const dragRef = jest.fn();
mockUseDrag.mockReturnValueOnce([{ isDragging: false }, dragRef]);
const wrapper = shallow(
<BrickItem
brick={{
type: "brick",
id: "widget-project.my-widget",
title: "my-widget",
thumbnail: null,
}}
layerType={LayerType.WIDGET}
/>
);
expect(wrapper.find(BuildFilled).length).toBe(1);
});
});
Example #2
Source File: BrickItem.tsx From next-basics with GNU General Public License v3.0 | 4 votes |
export function BrickItem({
brick,
onDraggingChange,
layerType,
}: BrickItemProps): React.ReactElement {
let brickType: string;
switch (brick.type) {
case "provider":
case "template":
brickType = brick.type;
// `customTemplate` will be treated as `brick`.
}
const transferItem =
brick.type === "snippet"
? {
type: BuilderDataTransferType.SNIPPET_TO_APPLY,
bricks: brick.bricks,
}
: {
type: BuilderDataTransferType.NODE_TO_ADD,
brickType,
brick: brick.id,
};
const [{ isDragging }, dragRef] = useDrag({
item: transferItem,
options: {
dropEffect: "copy",
},
collect: /* istanbul ignore next */ (monitor) => ({
isDragging: monitor.isDragging(),
}),
});
useEffect(() => {
onDraggingChange?.(isDragging);
}, [isDragging, onDraggingChange]);
let icon: JSX.Element;
if (brick.icon) {
icon = <GeneralIcon icon={brick.icon} />;
} else if (layerType === "widget") {
icon = brick.thumbnail ? (
<img
style={{
width: "auto",
height: "100%",
}}
src={brick.thumbnail}
/>
) : (
<BuildFilled />
);
} else {
switch (brick.type) {
case "provider":
icon = <DatabaseFilled />;
break;
case "template":
icon = <GoldenFilled />;
break;
case "customTemplate":
icon = (
<CopyFilled
className={classNames({
[styles.thumbnailType]: layerType !== LayerType.BRICK,
})}
/>
);
break;
case "snippet":
icon = brick.thumbnail ? (
<img src={brick.thumbnail} />
) : (
<NumberOutlined
className={classNames({
[styles.thumbnailType]: layerType !== LayerType.BRICK,
})}
/>
);
break;
default:
icon = <BuildFilled />;
}
}
return (
<div
className={`${styles.brickItem} ${styles[brick.type]} ${
styles[`layer-${layerType ?? LayerType.BRICK}`]
}`}
title={brick.description || brick.title}
ref={dragRef}
>
<span className={styles.brickIcon}>{icon}</span>
<span className={styles.brickName}>{brick.title}</span>
</div>
);
}