Result

Result UI Component

Installation

npm i @synerise/ds-result
or
yarn add @synerise/ds-result

Usage

import Result from '@synerise/ds-result'
<Result
type="success"
title="Chicken has been successfully cooked"
description="Would you like to cook any other chickens?"
onClose={() => console.log('close button was clicked')}
buttons={(
<>
<Button type="secondary">
Cancel
</Button>
<Button type="primary">
Freeze
</Button>
</>
)}
panel={(
<span>Some content, for example a picture of cooked chicken</span>
)}
closable
/>

Demo

API

PropertyDescriptionTypeDefault
typetype of resultinfo / warning / error / success / progress / no-results-
closablewhether or not to show X button to closeboolean-
titletitle textstring / React.ReactNode-
descriptiondescription textstring / React.ReactNode-
onCloseevent called when clicked on close button() => void-
buttonsrender buttonsReact.ReactNode-
panelrender custom panelReact.ReactNode-
customIconrender custom icon in place of type iconReact.ReactElement-
noSearchResultsuse only in search results (renders with smaller space between elements)boolean-