1.7.5 • Published 5 years ago
@nju33/slack v1.7.5
@nju33/slack
Install
yarn add @nju33/slack
Usage
import {useChat} from '@nju33/slack';
const {json, updateText, useAttachment} = useChat('postMessage', 'text');
updateText(text => `update-${text}`);
const {useTitle, useButton} = useAttachment('callback_id');
useTitle('title');
useButton('button name', 'button text', 'button value');
fetch(responseURL, {
method: 'POST',
headers: {
'Content-Type': 'application/json; charset=utf-8'
},
body: JSON.stringify(json()),
});
//
// {
// title: 'update-text',
// attachments: [
// {
// callback_id: 'callback_id',
// title: 'title',
// actions: [
// {
// type: 'button',
// name: 'button name',
// text: 'button text',
// value: 'button value',
// }
// ],
// },
// ]
// }
//
1.7.5
5 years ago
1.7.4
5 years ago
1.7.3
5 years ago
1.7.2
5 years ago
1.7.1
5 years ago
1.7.0
5 years ago
1.6.6
5 years ago
1.6.4
5 years ago
1.6.2
5 years ago
1.6.0
5 years ago
1.4.0
5 years ago
1.2.0
5 years ago
1.1.0-0
5 years ago
1.0.0-0
5 years ago
0.4.3
5 years ago
0.4.2
5 years ago
0.4.1
5 years ago
0.4.0
5 years ago
0.3.0
5 years ago
0.2.0
5 years ago
0.1.1
5 years ago
0.1.0
5 years ago
0.0.1
5 years ago