How to disable the text auto uppercase of a Button in mui5? - material-ui

How can I turn off the auto uppercase function of <Button> in material UI 5?
<Button variant="contained">Hello</Button>
It will automatically turn the text to HELLO, but I just want to keep the original Hello. How can I do that?

Simply add this property to your button :
style={{textTransform: 'none'}}

Related

Angular Material Input move placeholder on top when controls state is disabled

For angular material placeholder becomes a label when we enter value in the input control.
I am using my form for both view and edit mode. When in view mode I just disable the form so user can't edit it (based upon the user role and API takes care of it too)
However it looks pretty odd looking at control with placeholder text on it. Is there any CSS trick so that I can make placeholder value to be a label of that control and have the input shown as blank field (so it looks like no value is available for this control and placeholder actually becomes a label on the top)
Please advise
OK, I seems like my questions was not clear enough.
I found the solution and was pretty easy.
I used "floatLabel" attribute of mat-form-field and made is dynamic with form's disabled property.
if the form is disabled placeholder will be become label even if the input has not value available.
<mat-form-field appearance="fill" floatLabel="never">
<mat-label>Input</mat-label>
<input matInput>
</mat-form-field>

Replacing the <ion-select> button texts by icons

I am looking for a way to replace the placeholder texts in an ion-select action sheet with icons instead of simple text.
Now, I know the texts can be changed by adding ‘okText’ and ‘cancelText’ to the HTML:
<ion-select multiple="true" [(ngModel)]="selectedGenres" (ionChange)="filterByGenre()" okText="Okido!" cancelText="Nah, whatever..">
<ion-option *ngFor="let genre of genreList" value="{{genre}}">{{genre}}</ion-option>
</ion-select>
But what would be the best ways to add icons to those buttons?
For instance, I would like to replace the OK text with e.g. ‘ion-android-checkbox-blank’ icon and CANCEL text with e.g. ‘ion-android-close’ icon.
Not directly possible. You can use ionic modal to create your own selection list with your own buttons.
As an alternative, you may want to test emojis like ❌ and ✔️, but they will look different from device to device.

Radio Button Group display vertically

I am using the GWT to build the radio button , but when i display it shows one after another (in row).
Is there any way to stack the radio buttons in the group vertically?
It depends on the Panel you are adding it to. If you want things to line up vertically without any hassle, add each radio button to a VerticalPanel.
The reason it lines up is because GWT generates RadioButtons as HTML <span> elements, which by default has the CSS display set to inline.
If you prefer not to use a VerticalPanel, you can make RadioButtons have display:block;
One way is to wrap each RadioButton in a SimplePanel.
Another way is to set their display css attribute to block.
GWT RadioButton has a default provided CSS class for styling the RadioButton gwt-RadioButton
Example :
.gwt-RadioButton
{
display : block;
}

What's the difference between GWT's EditTextCell and TextInputCell?

Both cells seem to render an <input type="text"...></input>. How do they differ? What are their respective uses?
EditTextCell is a special cell that can be used to edit a text. By default the cell is in normal mode and the text is displayed as non-editable html. On click the cell changes to edit mode and the text is displayed in an input. The user can edit the text inside the input.
If in edit mode a ENTER changes back to normal mode and fires any ValueUpdater. If in edit mode a ESC changes back to normal mode without firing any ValueUpdater.
On the other hand TextInputCell is a cell that ALWAYS displays the text in an input element.
To see both cells is action (columns 3 & 4): http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellSampler
In EditTextCell you can press Escape to cancel edits.

GWT push button with text and image combination

Does anybody know of a way to make a push button with text on top of an image?
Well as far as I understand after some investigation, the only way is to implement own CustomButton.
Regular HTML <button>s don't support adding images to them. You'll have to use a regular <div> with a background image and text, styled to look like a button.