@botonic/react
Version:
Build Chatbots using React
12 lines • 708 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import React, { useContext } from 'react';
import { WEBCHAT } from '../../constants';
import { Scale } from '../../shared/styles';
import { ConditionalWrapper } from '../../util/react';
import { WebchatContext } from '../context';
export const ConditionalAnimation = props => {
const { getThemeProperty } = useContext(WebchatContext);
const animationsEnabled = getThemeProperty(WEBCHAT.CUSTOM_PROPERTIES.enableAnimations);
return (_jsx(ConditionalWrapper, Object.assign({ condition: animationsEnabled, wrapper: children => _jsx(Scale, { children: children }) }, { children: props.children })));
};
//# sourceMappingURL=conditional-animation.js.map