Use layout attributes on header-panel example

I've added layout attributes to this example to make it a bit tidier. @ebidel @arthurevans wdyt?
Should this be `flex` as described above?