forked from reactstrap/reactstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlaceholderButton.js
More file actions
41 lines (33 loc) · 1000 Bytes
/
Copy pathPlaceholderButton.js
File metadata and controls
41 lines (33 loc) · 1000 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
31
32
33
34
35
36
37
38
39
40
41
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { mapToCssModules, tagPropType } from './utils';
import Button from './Button';
import { getColumnClasses } from './Col';
const propTypes = {
size: PropTypes.string,
color: PropTypes.string,
outline: PropTypes.bool,
className: PropTypes.string,
tag: tagPropType,
cssModule: PropTypes.object,
};
const defaultProps = {
color: 'primary',
tag: Button,
};
function PlaceholderButton(props) {
let { cssModule, className, tag: Tag, ...attributes } = props;
let { attributes: modifiedAttributes, colClasses } = getColumnClasses(
attributes,
cssModule,
);
const classes = mapToCssModules(
classNames('placeholder', className, colClasses),
cssModule,
);
return <Button {...modifiedAttributes} className={classes} disabled />;
}
PlaceholderButton.propTypes = propTypes;
PlaceholderButton.defaultProps = defaultProps;
export default PlaceholderButton;