forked from auth0/styleguide
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
26 lines (23 loc) · 808 Bytes
/
Copy pathindex.js
File metadata and controls
26 lines (23 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import React, { PropTypes } from 'react';
/**
* Empty state: Simple component for onboarding users to sections with no data.
*/
const EmptyState = ({ title, description, iconCode, image, children }) =>
<div className="a0r-empty-state">
<h2 className="a0r-empty-state-title">{title}</h2>
{ image ||
<div className="a0r-empty-state-icon">
<i className={`icon-budicon-${iconCode}`} />
</div>
}
{ description && <p className="a0r-empty-state-description">{description}</p> }
<div className="a0r-empty-state-children"> {children} </div>
</div>;
EmptyState.propTypes = {
title: PropTypes.string.isRequired,
description: PropTypes.string.isRequired,
iconCode: PropTypes.string,
image: PropTypes.node,
children: PropTypes.node
};
export default EmptyState;