@ant-design/icons#DesktopOutlined TypeScript Examples
The following examples show how to use
@ant-design/icons#DesktopOutlined.
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: personalizationOptions.tsx From posthog-foss with MIT License | 6 votes |
PRODUCTS: RadioSelectType[] = [
{
key: 'web',
label: 'Web App',
icon: <GlobalOutlined />,
},
{
key: 'mobile',
label: 'Mobile App',
icon: <MobileOutlined />,
},
{
key: 'website',
label: 'Website',
icon: <DesktopOutlined />,
},
{
key: 'backend',
label: 'Backend Server',
icon: <CloudServerOutlined />,
},
{
key: 'data_pipeline',
label: 'Data Pipeline',
icon: <DatabaseOutlined />,
},
]
Example #2
Source File: Layout.tsx From nextjs-ant-design-typescript with MIT License | 5 votes |
AppLayout = (props: React.PropsWithChildren<Props>) => {
const [isCollapsed, setIsCollapsed] = useState(false);
const onChangeIsCollapsed = (isCollapsed: boolean) => {
setIsCollapsed(isCollapsed);
};
const pathname = props.router.pathname;
const pathsplit: string[] = pathname.split('/');
const routes = routesMaker(pathsplit);
return (
<Layout style={{ minHeight: '100vh' }}>
<Sider
collapsible
collapsed={isCollapsed}
onCollapse={onChangeIsCollapsed}
>
<Link href="/menu1">
<a>
<div className="App-logo" />
</a>
</Link>
<Menu
theme="dark"
defaultSelectedKeys={['/menu1']}
selectedKeys={[pathsplit.pop()]}
defaultOpenKeys={[pathsplit[1]]}
mode="inline"
>
<Item key="menu1" icon={<DesktopOutlined />}>
<Link href="/menu1">
<a>Menu 1</a>
</Link>
</Item>
<Item key="menu2" icon={<DashboardOutlined />}>
<Link href="/menu2">
<a>Menu 2</a>
</Link>
</Item>
<SubMenu key="menu3" icon={<SettingOutlined />} title="Menu 3">
<Item key="submenu1">
<Link href="/menu3/submenu1">
<a>Submenu 1</a>
</Link>
</Item>
<Item key="submenu2">
<Link href="/menu3/submenu2">
<a>Submenu 2</a>
</Link>
</Item>
</SubMenu>
</Menu>
</Sider>
<Layout style={{ padding: '0 16px 16px' }}>
<Breadcrumb
style={{ margin: '16px 0' }}
itemRender={itemRender}
routes={routes}
/>
<Content
className="site-layout-background"
style={{
padding: 16,
minHeight: 280,
backgroundColor: '#ffffff',
}}
>
{props.children}
</Content>
</Layout>
</Layout>
);
}
Example #3
Source File: DeviceSwitcher.tsx From datart with Apache License 2.0 | 5 votes |
DeviceSwitcher = () => {
const t = useI18NPrefix(`viz.board.action`);
const curDeviceType = useSelector(selectDeviceType);
const dispatch = useDispatch();
//why use async/await because: Wait until the state changes before triggering resize
const onDeviceSwitch = async value => {
const deviceType = value.key as DeviceType;
await dispatch(editDashBoardInfoActions.changeBoardDevice(deviceType));
dispatchResize();
};
const curIcon = useMemo(() => {
return curDeviceType === DeviceType.Mobile ? (
<MobileOutlined />
) : (
<DesktopOutlined />
);
}, [curDeviceType]);
const deviceItems = (
<Menu onClick={onDeviceSwitch}>
<Menu.Item
disabled={curDeviceType === DeviceType.Desktop}
key={DeviceType.Desktop}
icon={<DesktopOutlined />}
>
{DeviceType.Desktop}
</Menu.Item>
{/* <Menu.Item key={'tablet'} icon={<TabletOutlined />}>
{'tablet'}
</Menu.Item> */}
<Menu.Item
disabled={curDeviceType === DeviceType.Mobile}
key={DeviceType.Mobile}
icon={<MobileOutlined />}
>
{DeviceType.Mobile}
</Menu.Item>
</Menu>
);
return (
<Dropdown overlay={deviceItems} placement="bottomLeft" trigger={['click']}>
<Tooltip title={t('deviceSwitch')}>
<ToolbarButton icon={curIcon} />
</Tooltip>
</Dropdown>
);
}
Example #4
Source File: Icon.tsx From html2sketch with MIT License | 4 votes |
IconSymbol: FC = () => {
return (
<Row>
{/*<CaretUpOutlined*/}
{/* className="icon"*/}
{/* symbolName={'1.General/2.Icons/1.CaretUpOutlined'}*/}
{/*/>*/}
{/* className="icon"*/}
{/* symbolName={'1.General/2.Icons/2.MailOutlined'}*/}
{/*/>*/}
{/*<StepBackwardOutlined*/}
{/* className="icon"*/}
{/* symbolName={'1.General/2.Icons/2.StepBackwardOutlined'}*/}
{/*/>*/}
{/*<StepForwardOutlined*/}
{/* className="icon"*/}
{/* symbolName={'1.General/2.Icons/2.StepBackwardOutlined'}*/}
{/*/>*/}
<StepForwardOutlined />
<ShrinkOutlined />
<ArrowsAltOutlined />
<DownOutlined />
<UpOutlined />
<LeftOutlined />
<RightOutlined />
<CaretUpOutlined />
<CaretDownOutlined />
<CaretLeftOutlined />
<CaretRightOutlined />
<VerticalAlignTopOutlined />
<RollbackOutlined />
<FastBackwardOutlined />
<FastForwardOutlined />
<DoubleRightOutlined />
<DoubleLeftOutlined />
<VerticalLeftOutlined />
<VerticalRightOutlined />
<VerticalAlignMiddleOutlined />
<VerticalAlignBottomOutlined />
<ForwardOutlined />
<BackwardOutlined />
<EnterOutlined />
<RetweetOutlined />
<SwapOutlined />
<SwapLeftOutlined />
<SwapRightOutlined />
<ArrowUpOutlined />
<ArrowDownOutlined />
<ArrowLeftOutlined />
<ArrowRightOutlined />
<LoginOutlined />
<LogoutOutlined />
<MenuFoldOutlined />
<MenuUnfoldOutlined />
<BorderBottomOutlined />
<BorderHorizontalOutlined />
<BorderInnerOutlined />
<BorderOuterOutlined />
<BorderLeftOutlined />
<BorderRightOutlined />
<BorderTopOutlined />
<BorderVerticleOutlined />
<PicCenterOutlined />
<PicLeftOutlined />
<PicRightOutlined />
<RadiusBottomleftOutlined />
<RadiusBottomrightOutlined />
<RadiusUpleftOutlined />
<RadiusUprightOutlined />
<FullscreenOutlined />
<FullscreenExitOutlined />
<QuestionOutlined />
<PauseOutlined />
<MinusOutlined />
<PauseCircleOutlined />
<InfoOutlined />
<CloseOutlined />
<ExclamationOutlined />
<CheckOutlined />
<WarningOutlined />
<IssuesCloseOutlined />
<StopOutlined />
<EditOutlined />
<CopyOutlined />
<ScissorOutlined />
<DeleteOutlined />
<SnippetsOutlined />
<DiffOutlined />
<HighlightOutlined />
<AlignCenterOutlined />
<AlignLeftOutlined />
<AlignRightOutlined />
<BgColorsOutlined />
<BoldOutlined />
<ItalicOutlined />
<UnderlineOutlined />
<StrikethroughOutlined />
<RedoOutlined />
<UndoOutlined />
<ZoomInOutlined />
<ZoomOutOutlined />
<FontColorsOutlined />
<FontSizeOutlined />
<LineHeightOutlined />
<SortAscendingOutlined />
<SortDescendingOutlined />
<DragOutlined />
<OrderedListOutlined />
<UnorderedListOutlined />
<RadiusSettingOutlined />
<ColumnWidthOutlined />
<ColumnHeightOutlined />
<AreaChartOutlined />
<PieChartOutlined />
<BarChartOutlined />
<DotChartOutlined />
<LineChartOutlined />
<RadarChartOutlined />
<HeatMapOutlined />
<FallOutlined />
<RiseOutlined />
<StockOutlined />
<BoxPlotOutlined />
<FundOutlined />
<SlidersOutlined />
<AndroidOutlined />
<AppleOutlined />
<WindowsOutlined />
<IeOutlined />
<ChromeOutlined />
<GithubOutlined />
<AliwangwangOutlined />
<DingdingOutlined />
<WeiboSquareOutlined />
<WeiboCircleOutlined />
<TaobaoCircleOutlined />
<Html5Outlined />
<WeiboOutlined />
<TwitterOutlined />
<WechatOutlined />
<AlipayCircleOutlined />
<TaobaoOutlined />
<SkypeOutlined />
<FacebookOutlined />
<CodepenOutlined />
<CodeSandboxOutlined />
<AmazonOutlined />
<GoogleOutlined />
<AlipayOutlined />
<AntDesignOutlined />
<AntCloudOutlined />
<ZhihuOutlined />
<SlackOutlined />
<SlackSquareOutlined />
<BehanceSquareOutlined />
<DribbbleOutlined />
<DribbbleSquareOutlined />
<InstagramOutlined />
<YuqueOutlined />
<AlibabaOutlined />
<YahooOutlined />
<RedditOutlined />
<SketchOutlined />
<AccountBookOutlined />
<AlertOutlined />
<ApartmentOutlined />
<ApiOutlined />
<QqOutlined />
<MediumWorkmarkOutlined />
<GitlabOutlined />
<MediumOutlined />
<GooglePlusOutlined />
<AppstoreAddOutlined />
<AppstoreOutlined />
<AudioOutlined />
<AudioMutedOutlined />
<AuditOutlined />
<BankOutlined />
<BarcodeOutlined />
<BarsOutlined />
<BellOutlined />
<BlockOutlined />
<BookOutlined />
<BorderOutlined />
<BranchesOutlined />
<BuildOutlined />
<BulbOutlined />
<CalculatorOutlined />
<CalendarOutlined />
<CameraOutlined />
<CarOutlined />
<CarryOutOutlined />
<CiCircleOutlined />
<CiOutlined />
<CloudOutlined />
<ClearOutlined />
<ClusterOutlined />
<CodeOutlined />
<CoffeeOutlined />
<CompassOutlined />
<CompressOutlined />
<ContactsOutlined />
<ContainerOutlined />
<ControlOutlined />
<CopyrightCircleOutlined />
<CopyrightOutlined />
<CreditCardOutlined />
<CrownOutlined />
<CustomerServiceOutlined />
<DashboardOutlined />
<DatabaseOutlined />
<DeleteColumnOutlined />
<DeleteRowOutlined />
<DisconnectOutlined />
<DislikeOutlined />
<DollarCircleOutlined />
<DollarOutlined />
<DownloadOutlined />
<EllipsisOutlined />
<EnvironmentOutlined />
<EuroCircleOutlined />
<EuroOutlined />
<ExceptionOutlined />
<ExpandAltOutlined />
<ExpandOutlined />
<ExperimentOutlined />
<ExportOutlined />
<EyeOutlined />
<FieldBinaryOutlined />
<FieldNumberOutlined />
<FieldStringOutlined />
<DesktopOutlined />
<DingtalkOutlined />
<FileAddOutlined />
<FileDoneOutlined />
<FileExcelOutlined />
<FileExclamationOutlined />
<FileOutlined />
<FileImageOutlined />
<FileJpgOutlined />
<FileMarkdownOutlined />
<FilePdfOutlined />
<FilePptOutlined />
<FileProtectOutlined />
<FileSearchOutlined />
<FileSyncOutlined />
<FileTextOutlined />
<FileUnknownOutlined />
<FileWordOutlined />
<FilterOutlined />
<FireOutlined />
<FlagOutlined />
<FolderAddOutlined />
<FolderOutlined />
<FolderOpenOutlined />
<ForkOutlined />
<FormatPainterOutlined />
<FrownOutlined />
<FunctionOutlined />
<FunnelPlotOutlined />
<GatewayOutlined />
<GifOutlined />
<GiftOutlined />
<GlobalOutlined />
<GoldOutlined />
<GroupOutlined />
<HddOutlined />
<HeartOutlined />
<HistoryOutlined />
<HomeOutlined />
<HourglassOutlined />
<IdcardOutlined />
<ImportOutlined />
<InboxOutlined />
<InsertRowAboveOutlined />
<InsertRowBelowOutlined />
<InsertRowLeftOutlined />
<InsertRowRightOutlined />
<InsuranceOutlined />
<InteractionOutlined />
<KeyOutlined />
<LaptopOutlined />
<LayoutOutlined />
<LikeOutlined />
<LineOutlined />
<LinkOutlined />
<Loading3QuartersOutlined />
<LoadingOutlined />
<LockOutlined />
<MailOutlined />
<ManOutlined />
<MedicineBoxOutlined />
<MehOutlined />
<MenuOutlined />
<MergeCellsOutlined />
<MessageOutlined />
<MobileOutlined />
<MoneyCollectOutlined />
<MonitorOutlined />
<MoreOutlined />
<NodeCollapseOutlined />
<NodeExpandOutlined />
<NodeIndexOutlined />
<NotificationOutlined />
<NumberOutlined />
<PaperClipOutlined />
<PartitionOutlined />
<PayCircleOutlined />
<PercentageOutlined />
<PhoneOutlined />
<PictureOutlined />
<PoundCircleOutlined />
<PoundOutlined />
<PoweroffOutlined />
<PrinterOutlined />
<ProfileOutlined />
<ProjectOutlined />
<PropertySafetyOutlined />
<PullRequestOutlined />
<PushpinOutlined />
<QrcodeOutlined />
<ReadOutlined />
<ReconciliationOutlined />
<RedEnvelopeOutlined />
<ReloadOutlined />
<RestOutlined />
<RobotOutlined />
<RocketOutlined />
<SafetyCertificateOutlined />
<SafetyOutlined />
<ScanOutlined />
<ScheduleOutlined />
<SearchOutlined />
<SecurityScanOutlined />
<SelectOutlined />
<SendOutlined />
<SettingOutlined />
<ShakeOutlined />
<ShareAltOutlined />
<ShopOutlined />
<ShoppingCartOutlined />
<ShoppingOutlined />
<SisternodeOutlined />
<SkinOutlined />
<SmileOutlined />
<SolutionOutlined />
<SoundOutlined />
<SplitCellsOutlined />
<StarOutlined />
<SubnodeOutlined />
<SyncOutlined />
<TableOutlined />
<TabletOutlined />
<TagOutlined />
<TagsOutlined />
<TeamOutlined />
<ThunderboltOutlined />
<ToTopOutlined />
<ToolOutlined />
<TrademarkCircleOutlined />
<TrademarkOutlined />
<TransactionOutlined />
<TrophyOutlined />
<UngroupOutlined />
<UnlockOutlined />
<UploadOutlined />
<UsbOutlined />
<UserAddOutlined />
<UserDeleteOutlined />
<UserOutlined />
<UserSwitchOutlined />
<UsergroupAddOutlined />
<UsergroupDeleteOutlined />
<VideoCameraOutlined />
<WalletOutlined />
<WifiOutlined />
<BorderlessTableOutlined />
<WomanOutlined />
<BehanceOutlined />
<DropboxOutlined />
<DeploymentUnitOutlined />
<UpCircleOutlined />
<DownCircleOutlined />
<LeftCircleOutlined />
<RightCircleOutlined />
<UpSquareOutlined />
<DownSquareOutlined />
<LeftSquareOutlined />
<RightSquareOutlined />
<PlayCircleOutlined />
<QuestionCircleOutlined />
<PlusCircleOutlined />
<PlusSquareOutlined />
<MinusSquareOutlined />
<MinusCircleOutlined />
<InfoCircleOutlined />
<ExclamationCircleOutlined />
<CloseCircleOutlined />
<CloseSquareOutlined />
<CheckCircleOutlined />
<CheckSquareOutlined />
<ClockCircleOutlined />
<FormOutlined />
<DashOutlined />
<SmallDashOutlined />
<YoutubeOutlined />
<CodepenCircleOutlined />
<AliyunOutlined />
<PlusOutlined />
<LinkedinOutlined />
<AimOutlined />
<BugOutlined />
<CloudDownloadOutlined />
<CloudServerOutlined />
<CloudSyncOutlined />
<CloudUploadOutlined />
<CommentOutlined />
<ConsoleSqlOutlined />
<EyeInvisibleOutlined />
<FileGifOutlined />
<DeliveredProcedureOutlined />
<FieldTimeOutlined />
<FileZipOutlined />
<FolderViewOutlined />
<FundProjectionScreenOutlined />
<FundViewOutlined />
<MacCommandOutlined />
<PlaySquareOutlined />
<OneToOneOutlined />
<RotateLeftOutlined />
<RotateRightOutlined />
<SaveOutlined />
<SwitcherOutlined />
<TranslationOutlined />
<VerifiedOutlined />
<VideoCameraAddOutlined />
<WhatsAppOutlined />
{/*</Col>*/}
</Row>
);
}
Example #5
Source File: index.tsx From anew-server with MIT License | 4 votes |
Console: React.FC = () => {
const [ttys, setTtys] = useState<API.TtyList[]>(JSON.parse(localStorage.getItem('TABS_TTY_HOSTS') as string));
const [activeKey, setActiveKey] = useState<string>('tty1');
const [fileVisible, setFileVisible] = useState(false);
const [serverVisible, setServerVisible] = useState(false);
const [webSocketKey, setWebSocketKey] = useState<string>('');
const callback = (key: string) => {
setActiveKey(key)
}
const onEdit = (targetKey: any, action: any) => {
if (action === "remove") {
remove(targetKey)
}
//console.log(action, targetKey)
};
const remove = (key: React.Key) => {
let val = JSON.parse(localStorage.getItem('TABS_TTY_HOSTS') as string)
const index = val.map((item: API.TtyList) => item.actKey).indexOf(key)
val.splice(index, 1)
localStorage.setItem('TABS_TTY_HOSTS', JSON.stringify(val));
setTtys(val)
let [last] = [...val].reverse()
if (typeof (last) !== 'undefined') {
setActiveKey(last.actKey)
}
}
//监听事件
useEffect(() => {
window.onbeforeunload = () => {
localStorage.removeItem('TABS_TTY_HOSTS');
}
const refetch = (e: any) => {
if (e.key === "TABS_TTY_HOSTS") {
let val = JSON.parse(localStorage.getItem('TABS_TTY_HOSTS') as string)
setTtys(val)
if (val) {
let [last] = [...val].reverse()
setActiveKey(last.actKey)
}
}
}
window.addEventListener('storage', refetch)
return () => {
window.removeEventListener('storage', refetch)
};
}, [ttys]);
const operations = (
<div>
<Button icon={<DesktopOutlined />} onClick={() => {
setServerVisible(true)
}} >我的服务器</Button>
<Button icon={<FolderOutlined />} onClick={() => {
const val = JSON.parse(localStorage.getItem('TABS_TTY_HOSTS') as string)
if (val) {
const num = val.map((item: API.TtyList) => item.actKey).indexOf(activeKey)
if (num !== -1) {
setWebSocketKey(val[num].secKey)
setFileVisible(true)
} else {
message.error("未连接2")
}
} else {
message.error("未连接1")
}
}}>文件管理器</Button>
</div>
)
return (
<div>
<DraggableTabs
size="small"
type="editable-card"
tabBarStyle={{ margin: 0 }}
hideAdd
tabBarExtraContent={operations}
onChange={callback}
activeKey={activeKey}
onEdit={onEdit}>
{ttys && ttys.map((v, i) => (
<TabPane forceRender tab={<Tooltip title={v.ipaddr + `:` + v.port}>{v.hostname}</Tooltip>} key={v.actKey}>
<Terminal hostId={v.id} arrNum={i} />
</TabPane>
))}
</DraggableTabs>
{serverVisible && (
<ServerManager
handleChange={setServerVisible}
setTtys={setTtys}
setActiveKey={setActiveKey}
modalVisible={serverVisible}
/>
)}
{fileVisible && (
<FileManager
handleChange={setFileVisible}
connectId={encodeURIComponent(webSocketKey)}
modalVisible={fileVisible}
/>
)}
</div>
);
}