Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActionPanelHeader #343

Closed
atomanyih opened this issue Dec 16, 2015 · 3 comments
Closed

ActionPanelHeader #343

atomanyih opened this issue Dec 16, 2015 · 3 comments

Comments

@atomanyih
Copy link
Contributor

On appsman we made this thing:

const {PanelTitle} = require('pui-react-panels');

const ActionPanelHeader = ({title, actions}) => (
  <div className="action-panel-header">
    <PanelTitle>{title}</PanelTitle>

    <div className="actions mrl mtm">{actions}</div>
  </div>
);

module.exports = ActionPanelHeader;
.action-panel-header {
  position: relative;

  .actions {
    position: absolute;
    top: 0;
    right: 0;
  }
}

which is invoked roughly like this:

actions = <HighlightButton>click me</HighlightButton>
header = <ActionPanelHeader title="so title" actions={actions}/>

<BasicPanelAlt header={header}>
  Some stuff
</BasicPanelAlt>

If we like this, I'll make a PR or something

@atomanyih
Copy link
Contributor Author

note that this is only as nice as it is because of #342

@atomanyih
Copy link
Contributor Author

@atomanyih
Copy link
Contributor Author

relates to #287

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant