@botonic/react
Version:
Build Chatbots using React
12 lines • 792 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { useContext } from 'react';
import { ROLES, WEBCHAT } from '../../constants';
import { WebviewRequestContext } from '../../contexts';
import { WebchatContext } from '../context';
import { StyledCloseHeader, StyledWebviewHeader } from './styles';
export const WebviewHeader = () => {
const { closeWebview } = useContext(WebviewRequestContext);
const { getThemeProperty } = useContext(WebchatContext);
return (_jsx(StyledWebviewHeader, Object.assign({ role: ROLES.WEBVIEW_HEADER, style: Object.assign({}, getThemeProperty(WEBCHAT.CUSTOM_PROPERTIES.webviewHeaderStyle)) }, { children: _jsx(StyledCloseHeader, Object.assign({ onClick: () => closeWebview() }, { children: "\u2715" })) })));
};
//# sourceMappingURL=header.js.map