小编Luc*_*kas的帖子

通过覆盖样式道具使 material-ui 组件显示为内联

我试图让一个复选框出现在输入字段“回答输入一”的右侧我尝试过使用 display 属性,但我真的很喜欢 css 布局。我目前得到的

这是呈现答案输入的代码:

     <div>
  <TextField
  hintText="An informative question title..."
  fullWidth
  floatingLabelText="Question Title"
  value={questionTitle}
  onChange={(e) => this.props.questionTitleChanged(e.target.value)}
  />
  <TextField
  floatingLabelText="Answer Input 1"
  onChange={(e) => this.props.questionInputChanged({
    inputIndex: 0,
    value: e.target.value,
    correct: false
  })}
  value={questionInputs[0].value}
  style={styles.answerField}
  />

  <Checkbox
  onCheck={() => {
    let correctOrIncorrect = null;

    if (questionInputs[0].correct) {
      correctOrIncorrect = false;
    } else { correctOrIncorrect = true; }

    this.props.questionInputChanged({
    inputIndex: 0,
    value: null,
    correct: correctOrIncorrect });
  }}
  style={styles.checkbox}
  />

  </div>
Run Code Online (Sandbox Code Playgroud)

内联样式在这里:

const styles = {
  createQuizContainer: {
    width: '70%', …
Run Code Online (Sandbox Code Playgroud)

css material-ui

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

使用react本机app捆绑预先填充的域

我试图将一个预先填充的领域与一个本机应用程序捆绑在一起.

我已经按照这个,试图让这个为Android工作. https://github.com/realm/realm-js/issues/532

建议将领域放在assets文件夹中:(android/app/src/main/assets).我这样做了:

在此输入图像描述

但是,当我在我的基本组件的控制器中运行Realm.copyBundledRealmFiles()时,如下所示:

constructor(props) {
    super(props);
    Realm.copyBundledRealmFiles();
  }
Run Code Online (Sandbox Code Playgroud)

我得到了构建错误:

在此输入图像描述

任何帮助解决这个问题,以便我可以将预先填充的领域与应用程序捆绑在一起将非常有帮助.我现在已经工作了好几个小时了,似乎无法搞清楚!

realm android-emulator react-native android-device-monitor

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