【问题标题】:how to add an Arrow icon inside my React Js Project如何在我的 React Js 项目中添加箭头图标
【发布时间】:2022-01-06 10:21:10
【问题描述】:

我正在开发第 3 方 ReactJS SPFx SharePoint Web 部件。在代码中我有以下标记来显示 2 个图标-

import * as React from 'react';
import { Icon } from 'office-ui-fabric-react/lib/Icon';
import styles from './SingleNews.module.scss';
import { ISingleNewsProps } from './ISingleNewsProps';
import News from '../News';
//code goes here...

<span className={ styles.singleNews__content__info__reactions__likes}>
    <Icon className={styles.icon} iconName='Like' />
        post.likes}
</span>
<span className={ styles.singleNews__content__info__reactions__comments}>
    <Icon className={styles.icon}  iconName='ActionCenter' />
        {post.coments}
</span>

现在我想显示此图标(箭头)并将其着色为橙色,但不确定图标名称是什么?

谢谢

【问题讨论】:

    标签: html reactjs typescript icons


    【解决方案1】:

    试试这个:

    iconName='DecreaseIndentArrowMirrored'
    

    以下已编辑答案

    试试这个iconName='DecreaseIndentArrowMirrored-xl'DecreaseIndentArrowMirrored-lg

    阅读doc 也可能对您有所帮助

    【讨论】:

    • 我厌倦了你的代码,但它显示了一个非常小的箭头,,,不知道为什么?
    • 请尝试编辑后的答案
    猜你喜欢
    • 2016-08-26
    • 1970-01-01
    • 1970-01-01
    • 2020-11-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多