Comments (4)
This works:
<header className="mdl-layout__header is-casting-shadow">
<IconButton name="arrow_back" className="mdl-layout-icon" />
<HeaderRow title={title}>
...
</HeaderRow>
</header>
@tleunen Thanks for this awesome library!
from react-mdl.
You can put whatever you want inside the Drawer
component. So you can add your custom header if you want instead of using the Header
component. (Which doesn't seem to be the case in this mdl example anyway).
from react-mdl.
@tleunen Hey, I've got similar question. I'd like to add a back button to the header:
<header class="mdl-layout__header">
<button class="mdl-layout-icon mdl-button mdl-js-button mdl-button--icon">
<i class="material-icons">arrow_back</i>
</button>
<div class="mdl-layout__header-row">
<span class="mdl-layout-title">Some title</span>
<div class="mdl-layout-spacer"></div>
</div>
</header>
I guess it's not possible with the current Header
component? I can always use plain HTML, just asking :)
from react-mdl.
Everything you put in a <Header>
will be wrap inside a HeaderRow
, unless it's already a row, or a tab.
So with the current implementation, you cannot achieve exactly the same thing as what you describe, but you can have something quite similar I think using this:
const customTitle = <div><IconButton name="arrow_back" /> Some title</div>;
<Header title={customTitle} />
from react-mdl.
Related Issues (20)
- Library request on CDNJS HOT 3
- The prop `target` is marked as required in `Menu`
- React-MdL Dialog Not working in firefox and safari HOT 2
- Checkbox visibility
- Button ripple effect bug!?
- [TextField] Grey border-bottom doesn't disappear when field is clicked. Blue doesn't cover grey correctly. HOT 1
- DataTable: Is there any option to handle onSelectionChanged with out enabling selectable
- Should I use this project or react-toolbox? HOT 1
- Slider Tick Increments HOT 1
- Fix Circle CI and Codecov badges HOT 2
- [Typescript] Can you change this project to typescript ?
- [DataTable] accept nested objects in "rows" array HOT 1
- TypeError: Cannot read property 'upgradeElements' of undefined
- Where is the source code of react-mdl templates HOT 1
- how to get callback of click event on every single row in datatable
- Dialogs with input fields on mobile devices
- too many css files for WebStrom HOT 3
- 0
- Archive the repo? HOT 1
- "Uncaught Invariant Violation: Maximum update depth exceeded" in DataTable property onSelectionChanged Again
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-mdl.