forked from digiaonline/react-foundation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcallout.js
More file actions
30 lines (26 loc) · 846 Bytes
/
callout.js
File metadata and controls
30 lines (26 loc) · 846 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
27
28
29
30
import React, { PropTypes } from 'react';
import { CalloutColors, CalloutSizes } from '../enums';
import { GeneralPropTypes, createClassName, generalClassNames, removeProps, objectKeys, objectValues } from '../utils';
/**
* Callout component.
* http://foundation.zurb.com/sites/docs/callout.html
*
* @param {Object} props
* @returns {Object}
*/
export const Callout = props => {
const className = createClassName(
props.noDefaultClassName ? null : 'callout',
props.className,
props.color,
props.size,
generalClassNames(props)
);
const passProps = removeProps(props, objectKeys(Callout.propTypes));
return <div {...passProps} className={className}/>;
};
Callout.propTypes = {
...GeneralPropTypes,
color: PropTypes.oneOf(objectValues(CalloutColors)),
size: PropTypes.oneOf(objectValues(CalloutSizes))
};