@ant-design/icons#AlignRightOutlined TypeScript Examples
The following examples show how to use
@ant-design/icons#AlignRightOutlined.
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: horizontalAlign.tsx From imove with MIT License | 6 votes |
ALIGN_MAP: { [key: string]: AlignItem } = {
left: {
text: '左对齐',
icon: <AlignLeftOutlined />,
attrs: {
refX: 0,
refX2: 5,
textAnchor: 'start',
align: {
horizontal: 'left',
},
},
},
center: {
text: '居中对齐',
icon: <AlignCenterOutlined />,
attrs: {
refX: 0.5,
refX2: 0,
textAnchor: 'middle',
align: {
horizontal: 'center',
},
},
},
right: {
text: '右对齐',
icon: <AlignRightOutlined />,
attrs: {
refX: 0.99,
refX2: -5,
textAnchor: 'end',
align: {
horizontal: 'right',
},
},
},
}
Example #2
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 #3
Source File: Font.tsx From yugong with MIT License | 4 votes |
Font: React.FC<Props> = () => {
const context = useContext(StyleContext);
const [fontData, setFontData] = useState<FontTypesOfStyleItems>({});
const {
fontSize,
align,
lineHeight,
letterSP,
fontWeight,
fontStyle,
color,
decoration,
} = fontData;
const moduleId = useSelector(
(state: RootState) => state.activationItem.moduleId
);
useEffect(() => {
setFontData(context.getDefaultData?.("font") || {});
}, [context, moduleId]);
const onChangeFont = useCallback(
(type: ChangeType) => (data: any) => {
let value = data;
if (type === "align" || type === "decoration" || type === "fontWeight") {
value = data.target.value;
}
if (type === "fontWeight") {
if (data.target.checked) {
value = "bold";
} else {
value = "normal";
}
}
if (type === "fontStyle") {
if (data.target.checked) {
value = "italic";
} else {
value = "normal";
}
}
if (type === "color") {
value =
value.value &&
`rgba(${data.value.rgb.r}, ${data.value.rgb.g}, ${data.value.rgb.b}, ${data.value.rgb.a})`;
}
fontData[type] = value;
setFontData({ ...fontData });
if (context.onChange instanceof Function) {
context.onChange(fontData, "font");
}
},
[context, fontData]
);
return (
<>
<Row className={s.row}>
<Col span={8}>
<Radio.Group value={align} onChange={onChangeFont("align")}>
<Radio.Button value="left">
<AlignLeftOutlined />
</Radio.Button>
<Radio.Button value="center">
<AlignCenterOutlined />
</Radio.Button>
<Radio.Button value="right">
<AlignRightOutlined />
</Radio.Button>
</Radio.Group>
</Col>
<Col span={8}>
<Radio.Group value={decoration} onChange={onChangeFont("decoration")}>
<Radio.Button value="none">N</Radio.Button>
<Radio.Button value="underline">
<UnderlineOutlined />
</Radio.Button>
<Radio.Button value="line-through">
<StrikethroughOutlined />
</Radio.Button>
</Radio.Group>
</Col>
<Col span={8}>
<Checkbox
className={s.Checkbox}
checked={fontWeight === "bold"}
onChange={onChangeFont("fontWeight")}
>
<BoldOutlined />
</Checkbox>
<Checkbox
className={s.Checkbox}
checked={fontStyle === "italic"}
onChange={onChangeFont("fontStyle")}
>
<ItalicOutlined />
</Checkbox>
</Col>
</Row>
<Row className={s.row}>
<Col span={12}>
<Color
label="字体颜色"
onChange={onChangeFont("color")}
defaultColor={color}
/>
</Col>
<Col span={12}>
<UnitInput
label="字体大小"
min={0}
max={100000}
defaultValue={fontSize}
onChange={onChangeFont("fontSize")}
/>
</Col>
</Row>
<Row className={s.row}>
<Col span={12}>
<UnitInput
label="行间距"
min={0}
max={100000}
defaultValue={lineHeight}
onChange={onChangeFont("lineHeight")}
/>
</Col>
<Col span={12}>
<UnitInput
label="字间距"
min={0}
max={100000}
defaultValue={letterSP}
onChange={onChangeFont("letterSP")}
/>
</Col>
</Row>
</>
);
}
Example #4
Source File: index.tsx From ant-simple-draw with MIT License | 4 votes |
FontStyle: FC<FormProps<valueType>> = memo(function FontStyle({ value, onChange }) {
const [val, setVal] = useSetState<valueType>({
fontWeight: undefined,
fontStyle: undefined,
textDecoration: undefined,
textAlign: undefined,
});
const triggerChange = (changedValue: valueType) => {
onChange && onChange({ ...val, ...changedValue });
};
const handle = (flag: string) => {
if (flag === 'fontWeight') {
const fontWeight = {
fontWeight: val.fontWeight === 'bold' ? undefined : 'bold',
} as valueType;
setVal(fontWeight);
triggerChange(fontWeight);
}
if (flag === 'fontStyle') {
const fontStyle = { fontStyle: val.fontStyle === 'italic' ? undefined : 'italic' };
setVal(fontStyle);
triggerChange(fontStyle);
}
if (flag === 'underline' || flag === 'line-through') {
const textDecoration = {
textDecoration: val.textDecoration === flag ? undefined : flag,
};
setVal(textDecoration);
triggerChange(textDecoration);
}
if (['left', 'center', 'right', 'justify'].includes(flag)) {
const textAlign = {
textAlign: val.textAlign === flag ? undefined : flag,
} as valueType;
setVal(textAlign);
triggerChange(textAlign);
}
};
useEffect(() => {
if (value) {
setVal(value);
}
}, [value]);
return (
<Space
style={{
display: 'flex',
flex: '1',
justifyContent: 'space-around',
flexFlow: 'wrap',
padding: '3px 0',
}}
>
<Tooltip title="加粗">
<button style={{ width: '40px' }}>
<BoldOutlined
style={{
fontSize: '18px',
cursor: 'pointer',
color: val.fontWeight === 'bold' ? '#1890ff' : '#33383e',
}}
onClick={() => handle('fontWeight')}
/>
</button>
</Tooltip>
<Tooltip title="斜体">
<button style={{ width: '40px' }}>
<ItalicOutlined
style={{
fontSize: '18px',
cursor: 'pointer',
color: val.fontStyle === 'italic' ? '#1890ff' : '#33383e',
}}
onClick={() => handle('fontStyle')}
/>
</button>
</Tooltip>
<Tooltip title="下划线">
<button style={{ width: '40px' }}>
<UnderlineOutlined
style={{
fontSize: '18px',
cursor: 'pointer',
color: val.textDecoration === 'underline' ? '#1890ff' : '#33383e',
}}
onClick={() => handle('underline')}
/>
</button>
</Tooltip>
<Tooltip title="删除线">
<button style={{ width: '40px' }}>
<StrikethroughOutlined
style={{
fontSize: '18px',
cursor: 'pointer',
color: val.textDecoration === 'line-through' ? '#1890ff' : '#33383e',
}}
onClick={() => handle('line-through')}
/>
</button>
</Tooltip>
<Tooltip title="左对齐">
<button style={{ width: '40px' }}>
<AlignLeftOutlined
style={{
fontSize: '18px',
cursor: 'pointer',
color: val.textAlign === 'left' ? '#1890ff' : '#33383e',
}}
onClick={() => handle('left')}
/>
</button>
</Tooltip>
<Tooltip title="居中对齐">
<button style={{ width: '40px' }}>
<AlignCenterOutlined
style={{
fontSize: '18px',
cursor: 'pointer',
color: val.textAlign === 'center' ? '#1890ff' : '#33383e',
}}
onClick={() => handle('center')}
/>
</button>
</Tooltip>
<Tooltip title="右对齐">
<button style={{ width: '40px' }}>
<AlignRightOutlined
style={{
fontSize: '18px',
cursor: 'pointer',
color: val.textAlign === 'right' ? '#1890ff' : '#33383e',
}}
onClick={() => handle('right')}
/>
</button>
</Tooltip>
<Tooltip title="两边对齐">
<button style={{ width: '40px' }}>
<MenuOutlined
style={{
fontSize: '18px',
cursor: 'pointer',
color: val.textAlign === 'justify' ? '#1890ff' : '#33383e',
}}
onClick={() => handle('justify')}
/>
</button>
</Tooltip>
</Space>
);
})