Skip to content

Commit

Permalink
fix(example): add netlify badge
Browse files Browse the repository at this point in the history
  • Loading branch information
himself65 committed Sep 22, 2022
1 parent 7ae3ccb commit 60d1cc7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/basic/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const nextConfig = {
reactStrictMode: true,
optimizeFonts: true,
images: {
domains: ['i.imgur.com']
domains: ['i.imgur.com', 'www.netlify.com']
},
experimental: {
externalDir: true
Expand Down
27 changes: 25 additions & 2 deletions examples/basic/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import {
AppBar,
FormControl,
InputLabel,
MenuItem,
Select,
TextField
TextField, Toolbar, Typography
} from '@mui/material'
import {
applyValue,
Expand Down Expand Up @@ -103,6 +104,27 @@ const IndexPage: React.FC = () => {
}, [])
return (
<div>
<AppBar>
<Toolbar>
<Typography
variant='h6'
noWrap
component='div'
sx={{ flexGrow: 1, display: { xs: 'none', sm: 'block' } }}
>
JSON viewer
</Typography>
<a href='https://www.netlify.com' target='_blank' rel='noreferrer'>
<Image
width={114}
height={51}
src='https://www.netlify.com/v3/img/components/netlify-color-accent.svg'
alt='Deploys by Netlify'
/>
</a>
</Toolbar>
</AppBar>
<Toolbar/>
<TextField
label='indentWidth'
value={indent}
Expand Down Expand Up @@ -161,7 +183,8 @@ const IndexPage: React.FC = () => {
is: (value): value is string => typeof value === 'string' &&
value.startsWith('https://i.imgur.com'),
Component: (props) => {
return <Image height={50} width={50} src={props.value} alt={props.value}/>
return <Image height={50} width={50} src={props.value}
alt={props.value}/>
}
}
]}
Expand Down

0 comments on commit 60d1cc7

Please sign in to comment.