@ant-design/icons#VerticalAlignTopOutlined TypeScript Examples
The following examples show how to use
@ant-design/icons#VerticalAlignTopOutlined.
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: config-toolbar.ts From XFlow with MIT License | 6 votes |
registerIcon = () => {
IconStore.set('SaveOutlined', SaveOutlined)
IconStore.set('UndoOutlined', UndoOutlined)
IconStore.set('RedoOutlined', RedoOutlined)
IconStore.set('VerticalAlignTopOutlined', VerticalAlignTopOutlined)
IconStore.set('VerticalAlignBottomOutlined', VerticalAlignBottomOutlined)
IconStore.set('GatewayOutlined', GatewayOutlined)
IconStore.set('GroupOutlined', GroupOutlined)
IconStore.set('UngroupOutlined', UngroupOutlined)
IconStore.set('CopyOutlined', CopyOutlined)
IconStore.set('SnippetsOutlined', SnippetsOutlined)
}
Example #2
Source File: verticalAlign.tsx From imove with MIT License | 6 votes |
ALIGN_MAP: { [key: string]: AlignItem } = {
top: {
text: '上对齐',
icon: <VerticalAlignTopOutlined />,
attrs: {
refY: 0,
refY2: 10,
textVerticalAlign: 'start',
align: {
vertical: 'top',
},
},
},
center: {
text: '居中对齐',
icon: <VerticalAlignMiddleOutlined />,
attrs: {
refY: 0.5,
refY2: 0,
textVerticalAlign: 'middle',
align: {
vertical: 'center',
},
},
},
bottom: {
text: '下对齐',
icon: <VerticalAlignBottomOutlined />,
attrs: {
refY: 0.99,
refY2: -10,
textVerticalAlign: 'end',
align: {
vertical: 'bottom',
},
},
},
}
Example #3
Source File: ToTopToBottom.tsx From datart with Apache License 2.0 | 6 votes |
ToTopBtn: FC<{
fn: MouseEventHandler<HTMLElement> | undefined;
title: string;
}> = ({ fn, title }) => {
return (
<Tooltip title={title}>
<ToolbarButton onClick={fn} icon={<VerticalAlignTopOutlined />} />
</Tooltip>
);
}
Example #4
Source File: MoveUpDownRow.tsx From dnde with GNU General Public License v3.0 | 4 votes |
MoveUpDown = ({ className, idRef, active }: MoveUpDownProps) => {
const { mjmlJson, setMjmlJson } = useEditor();
const [upActive, setUpActive] = useState(true);
const [downActive, setDownActive] = useState(true);
useEffect(() => {
if (idRef.current === active) {
const uniqueClassName = findUniqueIdentifierFromString(className);
if (uniqueClassName) {
const child = findElementInJson(mjmlJson, findUniqueIdentifierFromString(className));
const parent = findElementInJson(mjmlJson, 'identifier-mj-body');
if (child && parent) {
const [parentItem] = parent;
const [childItem] = child;
// if section element is the first element
if (parentItem && parentItem.children && parentItem.children.length === 1) {
setUpActive(false);
setDownActive(false);
return;
} else if (parentItem && parentItem.children && parentItem.children.length > 1) {
const lastItem = parentItem.children.length - 1;
for (let i = 0; i < parentItem.children.length; i++) {
const childSection = parentItem.children[i];
if (
childSection &&
childSection.attributes &&
childSection.attributes['css-class'] &&
childSection.attributes['css-class'].includes(uniqueClassName)
) {
if (i === lastItem) {
setDownActive(false);
setUpActive(true);
break;
} else if (i === 0) {
setUpActive(false);
setDownActive(true);
break;
}
}
}
}
}
}
}
}, [mjmlJson, idRef, active]);
const MoveUp = (e: any) => {
ResetEventBehaviour(e);
moveSectionUp(className, mjmlJson, setMjmlJson);
};
const MoveDown = (e: any) => {
ResetEventBehaviour(e);
moveSectionDown(className, mjmlJson, setMjmlJson);
};
return (
<div onMouseDown={ResetEventBehaviour} style={{ display: active === idRef.current ? 'block' : 'none' }}>
<div
style={{
zIndex: 200,
position: 'absolute',
left: -38,
bottom: 0,
display: 'flex',
flexDirection: 'column',
rowGap: '4px',
}}
>
<Button
type="primary"
disabled={!upActive}
onClick={MoveUp}
icon={<VerticalAlignTopOutlined style={{ fontSize: '20px' }} />}
/>
<Button
type="primary"
disabled={!downActive}
onClick={MoveDown}
icon={<VerticalAlignBottomOutlined style={{ fontSize: '20px' }} />}
/>
</div>
</div>
);
}
Example #5
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 #6
Source File: field.card.tsx From ui with GNU Affero General Public License v3.0 | 4 votes |
FieldCard: React.FC<Props> = ({
form,
field,
fields,
onChangeFields,
remove,
move,
index,
}) => {
const { t } = useTranslation()
const type = form.getFieldValue([
'form', 'fields', field.name as string, 'type',
]) as string
const TypeComponent = (fieldTypes[type] || fieldTypes['textfield']).adminFormField()
const [shouldUpdate, setShouldUpdate] = useState(false)
const [nextTitle, setNextTitle] = useState<string>(
form.getFieldValue([
'form', 'fields', field.name as string, 'title',
])
)
useEffect(() => {
if (!shouldUpdate) {
return
}
const id = setTimeout(() => {
setShouldUpdate(false)
onChangeFields(
fields.map((field, i) => {
if (i === index) {
return {
...field,
title: nextTitle,
}
} else {
return field
}
})
)
}, 500)
return () => clearTimeout(id)
}, [
nextTitle, shouldUpdate, fields,
])
const addLogic = useCallback((add: (defaults: unknown) => void, index: number) => {
return (
<Form.Item wrapperCol={{ span: 24 }}>
<Space
style={{
width: '100%',
justifyContent: 'flex-end',
}}
>
<Button
type="dashed"
onClick={() => {
const defaults: FormFieldLogicFragment = {
id: `NEW-${Date.now()}`,
formula: null,
action: null,
jumpTo: null,
visible: null,
disable: null,
require: null,
enabled: false,
}
add(defaults)
}}
>
<PlusOutlined /> {t('form:logic.add')}
</Button>
</Space>
</Form.Item>
)
}, [])
return (
<Card
title={nextTitle}
type={'inner'}
extra={
<Space>
<Tooltip title={t('form:field.move.up')}>
<Button
type={'text'}
disabled={index === 0}
onClick={() => move(index, index - 1)}
icon={<VerticalAlignTopOutlined />}
/>
</Tooltip>
<Tooltip title={t('form:field.move.down')}>
<Button
type={'text'}
disabled={index + 1 >= form.getFieldValue(['form', 'fields']).length}
onClick={() => move(index, index + 1)}
icon={<VerticalAlignBottomOutlined />}
/>
</Tooltip>
<Form.Item noStyle shouldUpdate>
{() => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const slug = form.getFieldValue([
'form', 'fields', field.name as string, 'slug',
])
if (!slug) {
return null
}
return <Tag color={'warning'}>Slug: {slug}</Tag>
}}
</Form.Item>
<Popover
placement={'left'}
content={
<Form.Item
name={[field.name as string, 'slug']}
label={false}
rules={[
{
pattern: /^[a-z0-9_]+$/,
message: t('validation:invalidSlug'),
},
]}
help={t('type:slugInfo')}
>
<Input />
</Form.Item>
}
title={t('type:slug')}
>
<Tag color={'blue'}>{t(`type:${type}.name`)}</Tag>
</Popover>
<Popconfirm
placement={'left'}
title={t('type:confirmDelete')}
okText={t('type:deleteNow')}
okButtonProps={{ danger: true }}
onConfirm={() => {
remove(index)
onChangeFields(fields.filter((e, i) => i !== index))
}}
>
<Button danger>
<DeleteOutlined />
</Button>
</Popconfirm>
</Space>
}
>
<Form.Item name={[field.name as string, 'type']} noStyle>
<Input type={'hidden'} />
</Form.Item>
<Form.Item
label={t('type:title')}
name={[field.name as string, 'title']}
rules={[{ required: true, message: 'Title is required' }]}
labelCol={{ span: 6 }}
>
<Input
onChange={(e) => {
setNextTitle(e.target.value)
setShouldUpdate(true)
}}
/>
</Form.Item>
<Form.Item
label={t('type:description')}
name={[field.name as string, 'description']}
labelCol={{ span: 6 }}
extra={t('type:descriptionInfo')}
>
<Input.TextArea autoSize />
</Form.Item>
<Form.Item
label={t('type:required')}
name={[field.name as string, 'required']}
labelCol={{ span: 6 }}
valuePropName={'checked'}
extra={type === 'hidden' && t('type:requiredInfo')}
>
<Checkbox />
</Form.Item>
<TypeComponent field={field} form={form} />
<Form.List name={[field.name as string, 'logic']}>
{(logic, { add, remove, move }) => {
const addAndMove = (index: number) => (defaults) => {
add(defaults)
move(fields.length, index)
}
return (
<div>
{addLogic(addAndMove(0), 0)}
{logic.map((field, index) => (
<div key={field.key}>
<Form.Item wrapperCol={{ span: 24 }} noStyle>
<LogicBlock
field={field}
form={form}
fields={fields}
index={index}
remove={remove}
/>
</Form.Item>
{addLogic(addAndMove(index + 1), index + 1)}
</div>
))}
</div>
)
}}
</Form.List>
</Card>
)
}