@onereach/channel-transformer
Version:
Convert data model between different channels (Slack, Microsoft Teams, Generic...)
10 lines (9 loc) • 314 B
text/typescript
import { IGenericButton } from '../../../../generic/types';
import { IRWCOption } from '../../../types';
export const transformButton = ({ props }: IGenericButton): IRWCOption => {
const result: IRWCOption = {
label: props.label || props.value,
value: props.value || props.label
};
return result;
};