UNPKG

@zohodesk/dot

Version:

In this Library, we Provide Some Basic Components to Build Your Application

64 lines (63 loc) 1.9 kB
import React from 'react'; import { defaultProps } from "./props/defaultProps"; import { propTypes } from "./props/propTypes"; import { Container } from '@zohodesk/components/es/v1/Layout'; import ErrorWillBeRightBack from '@zohodesk/svg/es/v1/errorstate/version3/ErrorWillBeRightBack'; import Button from '@zohodesk/components/es/v1/Button/Button'; import CommonEmptyState from "../../emptystate/CommonEmptyState/CommonEmptyState"; import style from "../../../version2/errorstate/V2_ErrorStates.module.css"; export default function WillBeRightBack(props) { function errorWillBeRightBack() { return /*#__PURE__*/React.createElement(ErrorWillBeRightBack, { className: style.errorSvg }); } let { title, description, isButtonNeeded, className, isFluid, dataId, buttonText, onButtonClick, urlText, url, onClick, urlTarget, size } = props; return /*#__PURE__*/React.createElement(Container, { scroll: "vertical", className: `${style.container} ${style[size]}` }, /*#__PURE__*/React.createElement(CommonEmptyState, { title: title, description: description, getEmptyState: errorWillBeRightBack, className: `${style.errorState} ${className}`, isFluid: isFluid, dataId: dataId, linkUrl: url, linkText: urlText, onUrlClick: onClick, linkTarget: urlTarget, customClass: { titleClass: style.title, descriptionClass: style.desc } }, isButtonNeeded ? /*#__PURE__*/React.createElement(Button, { palette: "primaryFilled", text: buttonText, customClass: { customButton: style.errorBtn }, onClick: onButtonClick, dataId: `${dataId}_button` }) : null)); } WillBeRightBack.propTypes = propTypes; WillBeRightBack.defaultProps = defaultProps; // if (__DOCS__) { // WillBeRightBack.docs = { // componentGroup: 'errorStates' // }; // }