5
ReactJSを使用するにはまだ新しいです。ここに私のコードはReactJS CSSクラスが動作しない
import React, { Component, PropTypes } from 'react';
import s from './style.scss';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import { Grid, Row, Col } from 'react-bem-grid';
class OrderDetails extends Component {
render() {
return (
<div>
<Row>
<form class="orderform">
<h3>Product Details: </h3>
<Row>
<Col xs={5}>
Product: <br />
Category: <br />
Sub Category: <br />
Price: <br />
Color: <br />
Breakdown:
</Col>
<Col xs={4}>
test
</Col>
</Row>
<h3>Print Details</h3>
<Row>
<Col xs={5}>
Print Method: <br />
Position: <br />
Length: <br />
Width: <br />
Colors
</Col>
</Row>
</form>
</Row>
</div>
);
}
}
export default withStyles(OrderDetails, s);
あり、ここで私のstyle.cssファイル
.orderform{
color: red;
}
のための私のコードをである私は、特定のフォームのクラスを作成したいが、それは
が動作していませんこれの簡単なコード私はなぜそれが動作していないのか分かりません。 JSXはclassName
ない
class
を使用しているのでJSXではJavaScriptですので
まだ動作していない理由がわかりません。私は 'classnames/bind'からimport classNamesも追加しました。 – dczii
HTMLを調べると、すべて正常に動作しますが、それは問題である欠落しているクラスです – adeneo
これは動作しています。ありがとう:) – dczii