Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Paper-Button always as upper case

Tags:

polymer

People also ask

Should buttons be uppercase?

If you want users to avoid doing mistakes while performing a particular action, use capital letters in button texts. 4. Use all-capital texts in places such as UI buttons, tabs, ebook/blog/newspaper/e-paper headlines, titles of books, movies, magazines, and TV shows.

How do you make a button text lowercase in react?

For that just replace {title} with {title. toLowerCase()} and it will convert the titles text to lower case.

How do you capitalize a button in text?

To use a keyboard shortcut to change between lowercase, UPPERCASE, and Capitalize Each Word, select the text and press SHIFT + F3 until the case you want is applied.

How do you change all caps to lowercase in Excel?

In cell B2, type =PROPER(A2), then press Enter. This formula converts the name in cell A2 from uppercase to proper case. To convert the text to lowercase, type =LOWER(A2) instead. Use =UPPER(A2) in cases where you need to convert text to uppercase, replacing A2 with the appropriate cell reference.


As was mentioned in the comments above, the material design spec for buttons specifies that the text should be uppercase, but you can easily override its CSS property:

paper-button {
  text-transform: none;
}

I had the same issue and I solved the problem via adjusting the default theme. Add the following code to a file (name of your choice).js

import { createMuiTheme } from '@material-ui/core/styles';

const theme = createMuiTheme({      
  typography: {
    button: {
      textTransform: 'none'
    }
  }
});

export default theme;

You can then add the file to your app in index.js. I named it theme.js:

...
import theme from './theme';    
...
const app = () => (
  <ThemeProvider theme={theme}>
    <CssBaseline />
    <App />
  </ThemeProvider>
);

ReactDOM.render(app, document.getElementById('root'));

Inspired by the the CSS style above here is the inline styling for localized Button text transformation -

import {Button} from '@material-ui/core';

// Begin Component Logic
 
<Button style={{textTransform: 'none'}}>
   Hello World
</Button>

// End Component Logic