Skip to content

Commit 494ad34

Browse files
committed
Add alert for examples that does not work
1 parent a5639da commit 494ad34

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

packages/react-renderer-demo/src/components/component-example.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import Box from '@material-ui/core/Box';
1919
import LinkIcon from '@material-ui/icons/Link';
2020
import Button from '@material-ui/core/Button';
2121
import ButtonGroup from '@material-ui/core/ButtonGroup';
22+
import Alert from '@material-ui/lab/Alert';
2223

2324
import Link from 'next/link';
2425
import clsx from 'clsx';
@@ -120,6 +121,9 @@ const useStyles = makeStyles((theme) => ({
120121
buttonGroup: {
121122
marginTop: 16,
122123
marginBottom: 16
124+
},
125+
alert: {
126+
marginBottom: 8
123127
}
124128
}));
125129

@@ -161,9 +165,16 @@ const ComponentExample = ({ variants, schema, activeMapper, component }) => {
161165
));
162166

163167
const activeComponent = correctComponent(component);
168+
const showAlert = !['mui', 'pf4', 'ant'].includes(activeMapper);
164169

165170
return (
166171
<React.Fragment>
172+
{showAlert && (
173+
<Alert severity="warning" className={classes.alert}>
174+
Currently, we are dealing with &quot;Import error, cannot find file: ./cjs/react-is.development.js&quot; error that appears in examples
175+
using react-jss. Thank you for your understanding
176+
</Alert>
177+
)}
167178
<Box display="flex" className={classes.box}>
168179
<Card style={{ minHeight: 500 }} square>
169180
<CardContent>

0 commit comments

Comments
 (0)