2018-01-05 01:21:38 +03:00
|
|
|
/*
|
2018-01-05 01:51:49 +03:00
|
|
|
Copyright 2018 New Vector Ltd
|
2018-01-05 01:21:38 +03:00
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
2018-02-26 17:01:33 +03:00
|
|
|
import MImageBody from "./MImageBody";
|
2018-01-05 01:21:38 +03:00
|
|
|
|
2018-02-26 17:01:33 +03:00
|
|
|
export default class MStickerBody extends MImageBody {
|
|
|
|
displayName: 'MStickerBody'
|
2018-01-05 01:21:38 +03:00
|
|
|
|
2018-02-26 17:01:33 +03:00
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
|
|
|
}
|
2018-01-05 01:21:38 +03:00
|
|
|
|
2018-02-26 17:01:33 +03:00
|
|
|
_messageContent(contentUrl, thumbUrl, content) {
|
2018-01-05 01:21:38 +03:00
|
|
|
return (
|
2018-02-26 17:01:33 +03:00
|
|
|
<span className="mx_MImageBody" ref="body">
|
|
|
|
<img className="mx_MImageBody_thumbnail" src={thumbUrl} ref="image"
|
|
|
|
alt={content.body}
|
|
|
|
onLoad={this.props.onWidgetLoad}
|
|
|
|
onMouseEnter={this.onImageEnter}
|
|
|
|
onMouseLeave={this.onImageLeave} />
|
|
|
|
</span>
|
2018-01-05 01:21:38 +03:00
|
|
|
);
|
2018-02-26 17:01:33 +03:00
|
|
|
}
|
2018-01-05 01:21:38 +03:00
|
|
|
|
2018-02-26 17:01:33 +03:00
|
|
|
onClick() {
|
|
|
|
}
|
|
|
|
}
|