material-ui-next - 排版

use*_*620 2 reactjs material-ui

我使用material-ui 1.0.0-beta 31下面的组件.排版样式不显示在页面上,所有文本都具有相同的样式.有人可以解释一下我做错了吗?

import React from 'react';
import Typography from 'material-ui/Typography';

const LearningPage = (props, { authUser }) =>
  <div>
    <Typography variant="headline" component="h2">
      benevent
    </Typography>
    <Typography >adjective</Typography>
    <Typography component="p">
      well meaning and kindly.<br />
      {'"a benevolent smile"'}
    </Typography>
    <Typography variant="headline" gutterBottom>
      Headline
    </Typography>
  </div>

export default LearningPage;
Run Code Online (Sandbox Code Playgroud)

Jul*_*ont 5

所述variant支柱不材料的UI 1.0.0-β31中指定存在的发布说明,所述variant支柱在测试32中引入的.

在beta 32之前,type道具与道具具有相同的作用variant.这是进行更改的提交,如果您有兴趣,这里是讨论更改的问题.

因此,您有两种方法可以解决此问题:

  1. 升级到测试版32.
  2. 保持测试版31并重命名varianttype.