diff --git a/client/app/assets/less/redash/redash-newstyle.less b/client/app/assets/less/redash/redash-newstyle.less index 711d546f38..efb824d138 100644 --- a/client/app/assets/less/redash/redash-newstyle.less +++ b/client/app/assets/less/redash/redash-newstyle.less @@ -370,7 +370,7 @@ body { padding: 20px; } -page-header, .page-header--new { +.page-header-wrapper, .page-header--new { h3 { margin: 0.2em 0; line-height: 1.3; diff --git a/client/app/components/PageHeader.jsx b/client/app/components/PageHeader.jsx new file mode 100644 index 0000000000..748f8f7e91 --- /dev/null +++ b/client/app/components/PageHeader.jsx @@ -0,0 +1,23 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { react2angular } from 'react2angular'; + +export function PageHeader({ title }) { + return ( +
+
+

{ title }

+
+
+ ); +} + +PageHeader.propTypes = { + title: PropTypes.string.isRequired, +}; + +export default function init(ngModule) { + ngModule.component('pageHeader', react2angular(PageHeader)); +} + +init.init = true; diff --git a/client/app/components/page-header/index.js b/client/app/components/page-header/index.js deleted file mode 100644 index 149c72943e..0000000000 --- a/client/app/components/page-header/index.js +++ /dev/null @@ -1,16 +0,0 @@ -import template from './page-header.html'; - -function controller() {} - -export default function init(ngModule) { - ngModule.component('pageHeader', { - template, - controller, - transclude: true, - bindings: { - title: '@', - }, - }); -} - -init.init = true; diff --git a/client/app/components/page-header/page-header.html b/client/app/components/page-header/page-header.html deleted file mode 100644 index 056ca2558d..0000000000 --- a/client/app/components/page-header/page-header.html +++ /dev/null @@ -1,9 +0,0 @@ -
-
-

{{$ctrl.title}}

-
-
-

-

-
-
diff --git a/client/app/components/settings-screen.html b/client/app/components/settings-screen.html index 809867f1fd..fb0510dc5e 100644 --- a/client/app/components/settings-screen.html +++ b/client/app/components/settings-screen.html @@ -1,6 +1,5 @@
- - +