@onereach/channel-transformer
Version:
Convert data model between different channels (Slack, Microsoft Teams, Generic...)
24 lines (18 loc) • 404 B
text/typescript
import {
ISlackTextObject,
ISlackInput
} from '../../types';
function getElementWithSectionWrapper(
element, label: ISlackTextObject, interactive?: boolean
): ISlackInput {
const res: ISlackInput = {
type: 'input',
element,
label
};
if (typeof interactive === 'boolean') {
res.dispatch_action = interactive;
}
return res;
}
export { getElementWithSectionWrapper };