Repository URL to install this package:
|
Version:
0.0.15 ▾
|
import * as React from 'react';
import { oneRouter } from '@skava/router';
import { StyledEmptyTitle, StyledBlueButton, StyledImage, StyledEmptyLabel, BlueLink, } from './styled';
const url = `/`;
function handleClick() {
oneRouter.update(url);
}
export function renderContent(props) {
const pageName = oneRouter.pathname.split('/').pop();
const renderText = (props.title === '404' ? pageName.toUpperCase() : '') + props.text;
return React.createElement(StyledEmptyLabel, null, renderText);
}
export function renderSuggestionContent(props) {
return React.createElement(StyledEmptyTitle, null, props.emptyTitle);
}
export function renderActionContent(props) {
return (React.createElement(React.Fragment, null,
React.createElement(BlueLink, { to: url }, props.goBack),
React.createElement(BlueLink, { to: url }, props.keepShopping),
React.createElement(StyledBlueButton, { text: props.shopSaleItems, onClick: handleClick })));
}
export function renderImageContent(props) {
return React.createElement(StyledImage, { src: props.imageUrl, alt: "not found" });
}
//# sourceMappingURL=renderProps.js.map