Skip to content

Commit 379ea3e

Browse files
committed
Remove bsStyle support on Modal
1 parent 1c6c74b commit 379ea3e

File tree

6 files changed

+4
-33
lines changed

6 files changed

+4
-33
lines changed

docs/examples/ModalContained.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
const ContainedModal = React.createClass({
1313
render() {
1414
return (
15-
<Modal {...this.props} bsStyle='primary' title='Contained Modal' animation>
15+
<Modal {...this.props} title='Contained Modal' animation>
1616
<div className='modal-body'>
1717
Elit est explicabo ipsum eaque dolorem blanditiis doloribus sed id ipsam, beatae, rem fuga id earum? Inventore et facilis obcaecati.
1818
</div>

docs/examples/ModalOverlayMixin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const CustomModalTrigger = React.createClass({
2828
}
2929

3030
return (
31-
<Modal bsStyle='primary' title='Modal heading' onRequestHide={this.handleToggle}>
31+
<Modal title='Modal heading' onRequestHide={this.handleToggle}>
3232
<div className='modal-body'>
3333
This modal is controlled by our custom trigger component.
3434
</div>

docs/examples/ModalStatic.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ function handleHide() {
55
const modalInstance = (
66
<div className='static-modal'>
77
<Modal title='Modal title'
8-
bsStyle='primary'
98
backdrop={false}
109
animation={false}
1110
container={mountNode}

docs/examples/ModalTrigger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const MyModal = React.createClass({
22
render() {
33
return (
4-
<Modal {...this.props} bsStyle='primary' title='Modal heading' animation={false}>
4+
<Modal {...this.props} title='Modal heading' animation={false}>
55
<div className='modal-body'>
66
<h4>Text in a modal</h4>
77
<p>Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p>

src/Modal.js

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -95,23 +95,8 @@ const Modal = React.createClass({
9595
);
9696
}
9797

98-
let bsStyle = this.props.bsStyle;
99-
let classes = {
100-
'modal-header': true
101-
};
102-
classes['bg-' + bsStyle] = bsStyle;
103-
classes['text-' + bsStyle] = bsStyle;
104-
105-
let className = classNames(classes);
106-
107-
let style = {};
108-
if (this.props.bsStyle) {
109-
style.borderTopLeftRadius = 'inherit';
110-
style.borderTopRightRadius = 'inherit';
111-
}
112-
11398
return (
114-
<div className={className} style={style}>
99+
<div className="modal-header">
115100
{closeButton}
116101
{this.renderTitle()}
117102
</div>

test/ModalSpec.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,4 @@ describe('Modal', function () {
8585
assert.ok(dialog.className.match(/\bmodal-sm\b/));
8686
});
8787

88-
it('Should pass bsStyle to the header', function () {
89-
let noOp = function () {};
90-
let instance = ReactTestUtils.renderIntoDocument(
91-
<Modal bsStyle='danger' title="Title" onRequestHide={noOp}>
92-
<strong>Message</strong>
93-
</Modal>
94-
);
95-
96-
let header = instance.getDOMNode().getElementsByClassName('modal-header')[0];
97-
assert.ok(header.className.match(/\bbg-danger\b/));
98-
assert.ok(header.className.match(/\btext-danger\b/));
99-
});
100-
10188
});

0 commit comments

Comments
 (0)