0
我想自定義TextField的浮動標籤。如何自定義Material UI中的子組件
我知道創建一個新的工程如下圖,但有沒有更好的方法?
import TextFiled from 'material-ui/TextField';
class TextFiledNew extends Component {
static propTypes = {
}
render() {
return (
<TextFiled
floatingLabelFixed={true}
floatingLabelStyle = {{top: '88px', textTransform: 'uppercase', letterSpacing: '0.1em'}}
/>
)
}
}
module.exports = TextFiledNew
我試着不斷變化的主題的方式,但它不工作。
const muiTheme = getMuiTheme({
textField: {
floatingLabel:{
top: '88px',
textTransform: 'uppercase',
letterSpacing: '0.1'
}
}
});