What are the valid values for material -ui's Typography component

后端 未结 1 1037
小鲜肉
小鲜肉 2021-01-28 00:04

I am using Typography component as below. I am not facing any error. But i just want to know whether it is the right value i am passing to component property of typography compo

相关标签:
1条回答
  • 2021-01-28 00:34

    Typography is a fairly simple component. All it does is specify className on the component such that the text is styled appropriately.

    Your sample code is roughly equivalent to:

    <div className="potentially-multiple-classes-determined-by-Typography" style={{ padding: 8 }}>
       {props.children}
    </div>
    

    The component prop can be anything that is valid to use as an element type in JSX. Typography will use the component prop (which defaults to 'p' if no component prop or variant prop is specified) to render an element that it passes class names to and it also passes through any properties that aren't part of the Typography API (which is why the style and children properties get passed through to the component in this example).

    0 讨论(0)
提交回复
热议问题