UNPKG

@salesforce/design-system-react

Version:

Salesforce Lightning Design System for React

30 lines (25 loc) 888 B
import React from 'react'; import Toast from '~/components/toast'; // `~` is replaced with design-system-react at runtime import ToastContainer from '~/components/toast/container'; // `~` is replaced with design-system-react at runtime import IconSettings from '~/components/icon-settings'; class Example extends React.Component { render() { return ( <IconSettings iconPath="/assets/icons"> <ToastContainer> <Toast labels={{ heading: "You've encountered some errors when trying to save edits to Samuel Smith.", details: "Here's some detail of what happened, being very descriptive and transparent.", }} variant="error" /> </ToastContainer> </IconSettings> ); } } Example.displayName = 'ToastExample'; export default Example; // export is replaced with `ReactDOM.render(<Example />, mountNode);` at runtime