1 | import React from 'react';
|
2 | import PropTypes from 'prop-types';
|
3 | import classNames from 'classnames';
|
4 | import { mapToCssModules, tagPropType } from './utils';
|
5 | import Button from './Button';
|
6 | import { getColumnClasses } from './Col';
|
7 |
|
8 | const propTypes = {
|
9 | size: PropTypes.string,
|
10 | color: PropTypes.string,
|
11 | outline: PropTypes.bool,
|
12 | className: PropTypes.string,
|
13 | tag: tagPropType,
|
14 | cssModule: PropTypes.object,
|
15 | };
|
16 |
|
17 | function PlaceholderButton(props) {
|
18 | let { cssModule, className, tag: Tag = Button, ...attributes } = props;
|
19 |
|
20 | let { modifiedAttributes, colClasses } = getColumnClasses(
|
21 | { color: 'primary', ...attributes },
|
22 | cssModule,
|
23 | );
|
24 |
|
25 | const classes = mapToCssModules(
|
26 | classNames('placeholder', className, colClasses),
|
27 | cssModule,
|
28 | );
|
29 |
|
30 | return <Tag {...modifiedAttributes} className={classes} disabled />;
|
31 | }
|
32 |
|
33 | PlaceholderButton.propTypes = propTypes;
|
34 |
|
35 | export default PlaceholderButton;
|
36 |
|
\ | No newline at end of file |