Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | 1x 1x 1x 1x 1x 1x 1x | 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 ErrorInconvenience from '@zohodesk/svg/lib/errorstate/version3/ErrorInconvenience';
import Button from '@zohodesk/components/lib/Button/Button';
import style from './../V2_ErrorStates.module.css';
export default class Inconvenience extends React.Component {
constructor(props) {
super(props);
this.errorInconvenience = this.errorInconvenience.bind(this);
}
errorInconvenience() {
return <ErrorInconvenience className={style.errorSvg} />;
}
render() {
let {
title,
description,
isButtonNeeded,
className,
isFluid,
dataId,
buttonText,
onButtonClick,
urlText,
url,
onClick,
urlTarget,
size
} = this.props;
return (
<Container scroll='vertical' className={`${style.container} ${style[size]}`}>
<CommonEmptyState
title={title}
description={description}
getEmptyState={this.errorInconvenience}
className={`${style.errorState} ${className}`}
isFluid={isFluid}
dataId={dataId}
linkUrl={url}
linkText={urlText}
onUrlClick={onClick}
linkTarget={urlTarget}
customClass={{
titleClass: style.title,
descriptionClass: style.desc
}}
>
{isButtonNeeded ? (
<Button
palette='primaryFilled'
text={buttonText}
customClass={{
customButton: style.errorBtn
}}
onClick={onButtonClick}
dataId={`${dataId}_button`}
/>
) : null}
</CommonEmptyState>
</Container>
);
}
}
Inconvenience.propTypes = propTypes;
Inconvenience.defaultProps = defaultProps;
// if (__DOCS__) {
// Inconvenience.docs = {
// componentGroup: 'errorStates'
// };
// } |