Files
redash/client/app/components/BigMessage.jsx
Levko Kravets ac68fe1a6d Migrate Dashboards/Queries/Users list pages to React (#3381)
* Refine existing implementation of dashboards/queries/users lists and a common base controller

* Migrate common list page controller to React and refactor it's logic

* Migrate Dashboard list page to React

* Migrate Queries list page to React

* Migrate Users list page to React

* Remove react-timeago dependency

* Use composition instead of inheritance

* Refine implementation

* Merge sidebar into single component

* Refine column definitions

* Use simple controller instead of React context

* Refine implementation

* Restore changes from getredash/redash#2888

* Tweak Users list page

* Ability to render dynamically defined components

* Tweak users list page

* User list page for non-admins

* Fix: ItemsTable ignores isAvailable field

* Refine implementation

* Refine implementation

* Implement LiveItemsList as higher order component

* Some fixes

* Move some definitions to a better place

* Some fixes

* Refine components

* Refine UsersList page

* More comments for a god of comments

* Fix wrong tables size on smaller screens

* Tweak tables
2019-02-05 21:13:32 +02:00

36 lines
771 B
JavaScript

import React from 'react';
import PropTypes from 'prop-types';
import { react2angular } from 'react2angular';
export function BigMessage({ message, icon, children, className }) {
return (
<div className={'p-15 text-center ' + className}>
<h3 className="m-t-0 m-b-0">
<i className={'fa ' + icon} />
</h3>
<br />
{message}
{children}
</div>
);
}
BigMessage.propTypes = {
message: PropTypes.string,
icon: PropTypes.string.isRequired,
children: PropTypes.node,
className: PropTypes.string,
};
BigMessage.defaultProps = {
message: '',
children: null,
className: 'tiled bg-white',
};
export default function init(ngModule) {
ngModule.component('bigMessage', react2angular(BigMessage));
}
init.init = true;