react-bootstrap-front 3.9.2 → 3.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,54 @@
1
+ import React, { Component } from 'react';
2
+ import classnames from 'classnames';
3
+ import PropTypes from 'prop-types';
4
+ import { DropdownWrapper } from '../advanced'
5
+ import { DropdownMenu, DropdownMenuOption } from '../basic';
6
+
7
+ export default class MailMerge extends Component {
8
+ static propTypes = {
9
+ onChange: PropTypes.func,
10
+ };
11
+
12
+ constructor(props) {
13
+ super(props);
14
+ this.state = {
15
+ myRef: React.createRef()
16
+ }
17
+ this.onChange = this.onChange.bind(this);
18
+ }
19
+
20
+ stopPropagation = (event) => {
21
+ event.stopPropagation();
22
+ };
23
+
24
+ onChange = (text) => {
25
+ this.props.onChangeText(text);
26
+ }
27
+
28
+ render() {
29
+ const trigger = (
30
+ <button
31
+ type="button"
32
+ className={classnames(this.props.className, 'btn btn-light')}
33
+ >
34
+ {this.props.icon ? this.props.icon : 'MailMerge' }
35
+ </button>
36
+ );
37
+ const options = this.props.options;
38
+ return (
39
+ <DropdownWrapper trigger={trigger} className="ui-inline-wrapper btn-group pl-2" align="bottom-right" myRef={this.state.myRef}>
40
+ <DropdownMenu>
41
+ {options.map((text, index) =>
42
+ (<DropdownMenuOption
43
+ className="rdw-mailmerge-option"
44
+ onClick={() => this.onChange(text.text_content)}
45
+ key={index}
46
+ >
47
+ {text.text_code}
48
+ </DropdownMenuOption>),
49
+ )}
50
+ </DropdownMenu>
51
+ </DropdownWrapper>
52
+ );
53
+ }
54
+ }
File without changes
@@ -1,4 +1,7 @@
1
1
  export { default as ColorPicker } from "./ColorPicker";
2
2
  export { default as FontSize } from "./FontSize";
3
+ export { default as FontFamily } from "./FontFamily";
3
4
  export { default as Inline } from "./Inline";
5
+ export { default as Image } from "./Image";
6
+ export { default as MailMerge } from "./MailMerge";
4
7
  export { default as InputHtml } from "./InputHtml";
@@ -1,4 +1,7 @@
1
1
  @import './ColorPicker';
2
+ @import './FontFamily';
2
3
  @import './FontSize';
3
4
  @import './Inline';
4
- @import './InputHtml';
5
+ @import './Image';
6
+ @import './MailMerge';
7
+ @import './InputHtml';