import React, { HTMLAttributes } from 'react'; import styled from 'styled-components'; import SuccessIcon from '../icons/success.svg'; import WarningIcon from '../icons/warning.svg'; import ErrIcon from '../icons/error.svg'; import NotFoundIcon from '../icons/notFound.svg'; export interface ResultProps extends HTMLAttributes { status: 'success' | 'warning' | 'error' | '404'; title?: string; subTitle?: string; children?: React.ReactNode; gap?: number; } const ResultStyled = styled.div` width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; > .titles { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 15px; > .ui-result-title { font-size: 1.5em; font-weight: 700; word-break: break-word; text-align: center; } > .subTitle { font-size: 12px; font-weight: 500; word-break: break-word; text-align: center; } } > .actions { display: flex; justify-content: center; gap: 10px; } `; const Result: React.FC = (props) => { const { children, gap, title, subTitle, status, ...rest } = props; return (

{title}

{subTitle}

{children}
); }; Result.defaultProps = { children: '', title: '', subTitle: '', gap: 50 }; export default Result;