File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,8 +79,6 @@ import { MessageBox } from 'react-chat-elements'
7979| onClick | none | function | message on click (message(object) is returned) |
8080| onOpen | none | function | message on open (file or photo) (message(object) is returned) |
8181| onDownload | none | function | message on download (file or photo) (message(object) is returned) |
82- | width | none | int | only photo width (optional) |
83- | height | none | int | only photo height (optional) |
8482
8583
8684## SystemMessage Component
Original file line number Diff line number Diff line change @@ -62,14 +62,14 @@ export class App extends Component {
6262 position : ( this . token ( ) >= 1 ? 'right' : 'left' ) ,
6363 type : type ,
6464 text : loremIpsum ( { count : 1 , units : 'sentences' } ) ,
65- width : 300 ,
66- height : 300 ,
6765 data : {
6866 uri : `data:image/png;base64,${ this . photo ( 150 ) } ` ,
6967 status : {
7068 click : false ,
7169 loading : 0 ,
72- }
70+ } ,
71+ width : 300 ,
72+ height : 300 ,
7373 } ,
7474 date : new Date ( ) ,
7575 } ;
Original file line number Diff line number Diff line change @@ -30,9 +30,9 @@ export class PhotoMessage extends Component {
3030 < div className = "rce-mbox-photo" >
3131 < div
3232 className = "rce-mbox-photo--img"
33- style = { this . props . width && this . props . height && {
34- width : this . props . width ,
35- height : this . props . height ,
33+ style = { this . props . data . width && this . props . data . height && {
34+ width : this . props . data . width ,
35+ height : this . props . data . height ,
3636 } } >
3737 < img src = { this . props . data . uri } alt = { this . props . data . alt } onClick = { this . props . onOpen } />
3838 {
You can’t perform that action at this time.
0 commit comments