MCPcopy Create free account
hub / github.com/reactstrap/reactstrap / Toast

Function Toast

src/Toast.js:22–60  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

20};
21
22function Toast(props) {
23 const {
24 className,
25 cssModule,
26 tag: Tag = 'div',
27 isOpen = true,
28 children,
29 transition = {
30 ...Fade.defaultProps,
31 unmountOnExit: true,
32 },
33 fade = true,
34 innerRef,
35 ...attributes
36 } = props;
37
38 const classes = mapToCssModules(classNames(className, 'toast'), cssModule);
39
40 const toastTransition = {
41 ...Fade.defaultProps,
42 ...transition,
43 baseClass: fade ? transition.baseClass : '',
44 timeout: fade ? transition.timeout : 0,
45 };
46
47 return (
48 <Fade
49 {...attributes}
50 {...toastTransition}
51 tag={Tag}
52 className={classes}
53 in={isOpen}
54 role="alert"
55 innerRef={innerRef}
56 >
57 {children}
58 </Fade>
59 );
60}
61
62Toast.propTypes = propTypes;
63

Callers

nothing calls this directly

Calls 1

mapToCssModulesFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…