material-ui

How change active tab color in React material-ui?

时光怂恿深爱的人放手 提交于 2019-12-05 11:13:15
问题 How I can change the color of the active tab? I mean, this pink line, look at the pic. 回答1: Well, you have two options: You could customize the theme: http://www.material-ui.com/#/customization/themes But the easiest way would be using the inkBarStyle property. You can see it in the docs.. Example: <Tabs inkBarStyle={{background: 'blue'}}>... 回答2: @Risa's solution works just fine and should be the accepted answer. My example of her explanation looks like this: <Tabs fullWidth centered classes

Material UI Drawer Selection How to route?

回眸只為那壹抹淺笑 提交于 2019-12-05 05:02:12
问题 I am trying to use the Material UI React drawer but getting confused on how to implement the selection so that a change is made to a component. For example, I have a selection called Get Videos that should call up my component that does an AXIOS call to S3 to get the files in the buckets. How do I make the component switch on my selection? Should I use a route or should I set the state of the component to "active"? Any help would be appreciated.. Some Code handleClick(event) { ???? } render()

How to make a Material UI react Button act as a react-router-dom Link?

半城伤御伤魂 提交于 2019-12-05 04:26:52
How can I make a Material UI react Button component act as a Link component from react-router-dom without losing it's original style? Like changing the route on click. import Button from '@material-ui/core/Button'; <Button variant="contained" color="primary"> About Page </Button> To something like this, but maintaining the original Button style: import Button from '@material-ui/core/Button'; import { Link } from 'react-router-dom'; <Button variant="contained" color="primary"> <Link to="/about"> About Page </Link> </Button> Okay, this is very easy, I don't know why it was not working with me:

How to use Material-UI in asp.net mvc project

拜拜、爱过 提交于 2019-12-05 04:17:20
Is there a way of using Material-UI without having to go through installing all of the dependencies using NodeJS. I would love to use this in an ASP.NET Project but dont know where to begin as per installing dependencies and all of that. it's very easy.. Follow the below steps. Commit all the existing changes to your source control or backup existing code. delete or comment twitter bootstrap bundles in bundle config. using NPN .. install material design lite package. add all the .css and .js references to bundles. add new bundles you added to the layout page. Remember to change all the class

How to style Material-UI's tooltip?

 ̄綄美尐妖づ 提交于 2019-12-05 04:08:21
How can I style Material-UI's tooltip text? The default tooltip on hover comes out black with no text-wrap. Is it possible to change the background, color etc? Is this option even available? André Junges This answer is out of date. This answer was written in 2016 and Material-UI has gone through significant changes since then. Please see this answer for an approach that works with the current version (3.9.2 at this time). well, you can change the text color and the element background customizing the mui theme. color - is the text color rippleBackgroundColor - is the tooltip bbackground Example

How Can I Mask My Material-UI TextField?

Deadly 提交于 2019-12-05 02:24:26
I have a TextField for phone numbers in a short form. And then i want to mask this form field like (0)xxx xxx xx xx. I'm trying to use react-input-mask plugin with Material-UI . But if i want to change input value, this is not updating the my main TextField. <TextField ref="phone" name="phone" type="text" value={this.state.phone} onChange={this.onChange} > <InputMask value={this.state.phone} onChange={this.onChange} mask="(0)999 999 99 99" maskChar=" " /> </TextField> Actually, I couldn't find any documentation for masking with Material-UI. I'm trying to figure out how can i use with another

Material-UI [v0.x] RaisedButton on hover styles

强颜欢笑 提交于 2019-12-05 02:18:43
I'd like to change the styling of a Material-UI RaisedButton on hover, but it seems like there is no specific option to do that, as what happens on hover is sort of defined by material design guidelines. Nevertheless, is there any way to change a button's styling (mainly color and background-color) when hovering over them? I see m-ui is using a lot of different layers for their buttons, and currently adds a white transparent background on top of the button so that it performs well with all theme colours. (To be more precise, I'd like to invert the colours between the colour and background

TypeError: Cannot read property 'prepareStyles' of undefined

醉酒当歌 提交于 2019-12-04 22:19:14
My Component looks like import React, {PropTypes} from 'react'; import TransactionListRow from './TransactionListRow'; import {Table, TableBody, TableHeader, TableHeaderColumn, TableRow} from 'material-ui/Table'; const TransactionList = ({transactions}) => { return ( <Table> <TableHeader displaySelectAll={false}> <TableRow> <TableHeaderColumn>Name</TableHeaderColumn> <TableHeaderColumn>Amount</TableHeaderColumn> <TableHeaderColumn>Transaction</TableHeaderColumn> <TableHeaderColumn>Category</TableHeaderColumn> </TableRow> </TableHeader> <TableBody> {transactions.map(transaction =>

Material-ui @next customize button colors?

微笑、不失礼 提交于 2019-12-04 20:17:02
问题 I am struggling to modify button colors in Material-UI@next (v1). How would I set muitheme to behave similarity to bootstrap, so I could just use "btn-danger" for red, "btn-success" for green... ? I tried with custom className but it doesn't work properly (hover color does't change) and it seems repetitive. What options do I have? 回答1: I came up with this solution using Brendans answer in this thread. Hopefully it'll help someone in a similar situation. import React, { Component } from 'react

Opening Date/Time Picker programatically in Material UI LIbary

本小妞迷上赌 提交于 2019-12-04 18:40:16
I'm doing a project which uses React and Material Design. I'd like to go with Material UI , as I need fancy Dat- and Time Pickers, which this Library supplies as components. As I have to set Start- and End-Times and -Dates in a particular step in the app, I'd like to "hop" from one Picker to the next to decrease the Clicks the User has to make, i.e. Click on "Start Date" Input field Picker opens, Date gets selected The closing of the first Picker should open the next Picker (Start Time) Closing it opens the next Picker (End Date) Closing it opens the next Picker (End Time) I know how to fire