@@ -36,6 +36,15 @@ export class App extends Component {
3636 // setInterval(this.addMessage.bind(this), 3000);
3737 }
3838
39+ getRandomColor ( ) {
40+ var letters = '0123456789ABCDEF' ;
41+ var color = '#' ;
42+ for ( var i = 0 ; i < 6 ; i ++ ) {
43+ color += letters [ Math . floor ( Math . random ( ) * 16 ) ] ;
44+ }
45+ return color ;
46+ }
47+
3948 token ( ) {
4049 return ( parseInt ( Math . random ( ) * 10 % 3 ) ) ;
4150 }
@@ -61,6 +70,8 @@ export class App extends Component {
6170 return {
6271 position : ( this . token ( ) >= 1 ? 'right' : 'left' ) ,
6372 type : type ,
73+ title : loremIpsum ( { count : 2 , units : 'words' } ) ,
74+ titleColor : this . getRandomColor ( ) ,
6475 text : loremIpsum ( { count : 1 , units : 'sentences' } ) ,
6576 data : {
6677 uri : `data:image/png;base64,${ this . photo ( 150 ) } ` ,
@@ -162,10 +173,13 @@ export class App extends Component {
162173 < MessageList
163174 className = 'message-list'
164175 onDownload = { ( ) => {
165- debugger ;
176+ console . log ( 'onDownload' ) ;
177+ } }
178+ onTitleClick = { ( ) => {
179+ console . log ( 'onTitleClick' ) ;
166180 } }
167181 onOpen = { ( ) => {
168- debugger ;
182+ console . log ( 'onOpen' ) ;
169183 } }
170184 lockable = { true }
171185 dataSource = { this . state . messageList } />
@@ -176,16 +190,9 @@ export class App extends Component {
176190 multiline = { true }
177191 // buttonsFloat='left'
178192 rightButtons = {
179- < Dropdown
180- items = { [
181- 'asdasd' ,
182- 'Lorem ipsum dolor sit amet.' ,
183- ] }
184- buttonProps = { {
185- text : 'Boşu Boşuna'
186- } }
187- onSelect = { this . addMessage . bind ( this ) }
188- animationPosition = 'southeast' />
193+ < Button
194+ text = 'Gönder'
195+ onClick = { this . addMessage . bind ( this ) } />
189196 } />
190197 </ div >
191198
0 commit comments