小编Gan*_*ate的帖子

如何更改字体超赞图标的方向?

我正在使用字体字体库显示解锁图标。

因此,默认情况下方向是朝正确的方向,我想将其更改为左边。

<i class="fas fa-unlock-alt"></i>
Run Code Online (Sandbox Code Playgroud)

所以,有什么方法可以改变解锁图标的方向?

javascript css font-awesome font-awesome-5

4
推荐指数
2
解决办法
136
查看次数

ReactStrap 模态关闭图标未显示在模态中以及如何将标头与其他标签一起使用

我是 React js 的新手。在这里,我使用reactStrap.

<Modal isOpen={props.isOpen} centered='true'>
        <ModalHeader>
          Change this Question?
          <button type="button" class="close" aria-label="Close" onClick={props.closeModal} ><span aria-hidden="true">×</span></button>
        </ModalHeader>
        <ModalBody>
          <div className="row">
            <div className="col-md-12 text-center ">
              <Button type="submit" className="btn btn-outline-primary" onClick={props.showChangeQuestionModal} >Change by creating your own Question</Button>
            </div>
          </div>
          <div className="row">
            <div className="col-md-12 text-center marginForOrOption">
              <span>or</span>
            </div>
          </div>
          <div className="row">
            <div className="col-md-12 text-center">
              <Button type="submit" color="btn btn-primary">Change and Replace from Question bank</Button>
            </div>
          </div>
        </ModalBody>
        <ModalFooter>
        </ModalFooter>
      </Modal>
    </div>
Run Code Online (Sandbox Code Playgroud)

现在我在这里添加了该按钮来关闭 modal 。但是在 reactstrap 中它是默认的。但在我的情况下它不会来。

另一个问题是,在 ModalHeader 中,它默认为 h5,所以我该如何更改?

javascript reactjs redux react-redux reactstrap

3
推荐指数
1
解决办法
3858
查看次数

如何在 react-select 中使用字符串数组作为选项

我是新手react。我react select用于选择。现在,我有以下内容jsx

div className="col-md-4 d-flex align-items-center" style={borderClass}>
                <label className="mb-0 font-weight-bold" style={labelFont}>
                  Technology
                                </label>
                <Select
                  styles={styles}
                  options={this.props.technology}
                  placeholder="None Selected"
                />
              </div>


const mapStateToProps = (state) => {
  return {
    technology : state.CreateJob.technology,
    userCompany: state.CreateJob.userCompany
  }
}
Run Code Online (Sandbox Code Playgroud)

这是来自减速器作为道具。现在,我得到的数据就像,

['a', 'b', 'c']
Run Code Online (Sandbox Code Playgroud)

那么,我如何在渲染中使用它作为一个选项。谁能帮我这个 ?谢谢。

javascript reactjs react-select redux react-redux

2
推荐指数
2
解决办法
2万
查看次数

如何在悬停时使用 reactstrap popover?

我是反应的新手。在这里,我使用了一个名为 的库reactstrap,其中,

import React from 'react';
import { Button, Popover, PopoverHeader, PopoverBody } from 'reactstrap';

export default class Example extends React.Component {
  constructor(props) {
    super(props);

    this.toggle = this.toggle.bind(this);
    this.state = {
      popoverOpen: false
    };
  }

  toggle() {
    this.setState({
      popoverOpen: !this.state.popoverOpen
    });
  }

  render() {
    return (
      <div>
        <Button id="Popover1" type="button">
          Launch Popover
        </Button>
        <Popover placement="bottom" isOpen={this.state.popoverOpen} target="Popover1" toggle={this.toggle}>
          <PopoverHeader>Popover Title</PopoverHeader>
          <PopoverBody>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</PopoverBody>
        </Popover> …
Run Code Online (Sandbox Code Playgroud)

javascript popover reactjs reactstrap

1
推荐指数
1
解决办法
3828
查看次数