Skip to content

Instantly share code, notes, and snippets.

@nxsyed
Created July 12, 2018 20:21
Show Gist options
  • Save nxsyed/aa9ae23c0f7a1c541dc8e4cf4cd4cd1d to your computer and use it in GitHub Desktop.
Save nxsyed/aa9ae23c0f7a1c541dc8e4cf4cd4cd1d to your computer and use it in GitHub Desktop.
import { Button, Input, List } from 'antd';
// Other Code
render() {
const messages = [
'Ok I\'ll be there in 5 mins',
'Call my number 415-xxx-6631',
'Alright, the door is open'
];
return (
<div className="App">
<List
header={<div>Choose a preselected response</div>}
bordered
dataSource={messages}
renderItem={item => (<List.Item>
<Button onClick={this.publish.bind(this, item)} type="primary">{item}</Button>
</List.Item>)
}
/>
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment