npm.io
2.0.5 • Published 1 week ago

@synerise/ds-result

Licence
ISC
Version
2.0.5
Deps
0
Vulns
0
Weekly
0

id: result title: 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?"
  buttons={(
    <>
      <Button type="secondary">
        Cancel
      </Button>
      <Button type="primary">
        Freeze
      </Button>
    </>
  )}
  panel={(
    <span>Some content, for example a picture of cooked chicken</span>
  )}
/>

Demo

API

Property Description Type Default
type type of result info / warning / error / success / progress / no-results -
title title text string / React.ReactNode -
description description text string / React.ReactNode -
buttons render buttons React.ReactNode -
panel render custom panel React.ReactNode -
customIcon render custom icon in place of type icon React.ReactElement -
noSearchResults Deprecated — use type="no-results" instead boolean -