Skip to content

Commit 8bd1969

Browse files
committed
extra control group style
1 parent e2e65dc commit 8bd1969

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

dist/react-simple-chatbot.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/react-simple-chatbot.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/ChatBot.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,7 @@ class ChatBot extends Component {
602602
className,
603603
contentStyle,
604604
extraControl,
605+
controlStyle,
605606
floating,
606607
floatingIcon,
607608
floatingStyle,
@@ -690,7 +691,7 @@ class ChatBot extends Component {
690691
{...inputAttributesOverride}
691692
/>
692693
)}
693-
<div className="rsc-controls">
694+
<div style={controlStyle} className="rsc-controls">
694695
{!currentStep.hideInput && !currentStep.hideExtraControl && extraControl}
695696
{!currentStep.hideInput && !hideSubmitButton && (
696697
<SubmitButton
@@ -724,6 +725,7 @@ ChatBot.propTypes = {
724725
contentStyle: PropTypes.objectOf(PropTypes.any),
725726
customDelay: PropTypes.number,
726727
customStyle: PropTypes.objectOf(PropTypes.any),
728+
controlStyle: PropTypes.objectOf(PropTypes.any),
727729
enableMobileAutoFocus: PropTypes.bool,
728730
enableSmoothScroll: PropTypes.bool,
729731
extraControl: PropTypes.objectOf(PropTypes.element),
@@ -773,6 +775,7 @@ ChatBot.defaultProps = {
773775
className: '',
774776
contentStyle: {},
775777
customStyle: {},
778+
controlStyle: { position: 'absolute', right: '0', top: '0' },
776779
customDelay: 1000,
777780
enableMobileAutoFocus: false,
778781
enableSmoothScroll: false,

lib/components/SubmitButton.jsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ const SubmitButton = styled.button`
2121
opacity: ${props => (props.disabled && !props.invalid ? '.5' : '1')};
2222
outline: none;
2323
padding: 14px 16px 12px 16px;
24-
position: absolute;
25-
right: 0;
26-
top: 0;
2724
&:before {
2825
content: '';
2926
position: absolute;

0 commit comments

Comments
 (0)