UNPKG

@zohodesk/dot

Version:

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

72 lines (69 loc) 2.06 kB
import React from 'react'; import { defaultProps } from "./props/defaultProps"; import { propTypes } from "./props/propTypes"; import { Container } from '@zohodesk/components/lib/Layout'; import CommonEmptyState from "../../../emptystate/CommonEmptyState/CommonEmptyState"; import ErrorUrlNotFound from '@zohodesk/svg/lib/errorstate/version3/ErrorUrlNotFound'; import Button from '@zohodesk/components/lib/Button/Button'; import style from "./../V2_ErrorStates.module.css"; export default class UrlNotFound extends React.Component { constructor(props) { super(props); this.errorUrlNotFound = this.errorUrlNotFound.bind(this); } errorUrlNotFound() { return /*#__PURE__*/React.createElement(ErrorUrlNotFound, { className: style.errorSvg }); } render() { let { title, description, isButtonNeeded, className, isFluid, dataId, buttonText, onButtonClick, urlText, url, onClick, urlTarget, size } = this.props; return /*#__PURE__*/React.createElement(Container, { scroll: "vertical", className: `${style.container} ${style[size]}` }, /*#__PURE__*/React.createElement(CommonEmptyState, { title: title, description: description, getEmptyState: this.errorUrlNotFound, 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)); } } UrlNotFound.propTypes = propTypes; UrlNotFound.defaultProps = defaultProps; // if (__DOCS__) { // UrlNotFound.docs = { // componentGroup: 'errorStates' // }; // }