css - Simple Label in material-ui AppBar -
i wanted have simple label displayed in right part of appbar. i'm using iconelementright
prop , pass disabled flat button:
<appbar iconelementright={<flatbutton label="my label" disabled={true}/>} />
this feels terrible couldn't find different way without having own styling.
i tried simple div styles terribly:
<appbar iconelementright={<div><span>mylabel<span></div>} />
<div style="border-radius: 0px; transition:450ms cubic-bezier(0.23, 1, 0.32, 1); width: 100%; color: rgba(0, 0, 0, 0.87); padding-right: 24px; padding-left: 24px; font-family: roboto, sans-serif; display: flex; position: relative; z-index: 1100; box-sizing: border-box; box-shadow: 0px 1px 6px rgba(0,0,0,0.12), 0px 1px 4px rgba(0,0,0,0.12); background-color: rgb(250, 250, 250);"> <button tabindex="0" style="background: none; margin: 1px 8px 0px -16px; padding: 12px; border: 10px currentcolor; transition:450ms cubic-bezier(0.23, 1, 0.32, 1); border-image: none; width: 48px; height: 48px; overflow: visible; font-family: roboto, sans-serif; font-size: 0px; font-weight: inherit; text-decoration: none; display: inline-block; position: relative; cursor: pointer; box-sizing: border-box; transform: translate(0px, 0px);" type="button"> </button> <div style="margin-top: 1px; margin-right: -16px; margin-left: auto;"> <div><span>my label</span> </div> </div> </div>
is there missing other doing custom styling/disabled button hack?
by definition, app bar component doesn't style plain text, because:
the app bar, formerly known action bar in android, special kind of toolbar that’s used branding, navigation, search, , actions.
a standalone label used neither branding, navigation, search nor actions.
for reason, if you're wanting circumvent standard have style yourself.
Comments
Post a Comment