Index
Edit

Icons for data types

Each document type can be assigned an icon to illustrate its purpose. We recommend using an SVG file, but it can be any react component you like.

react-icons is a useful NPM package for open source SVG icons from Font Awesome, Material Design, Typicons and Github Octicons. To see all the react-icons, check out https://gorangajic.github.io/react-icons.

Example

After including react-icons in your package.json you can just:

import MovieIcon from 'react-icons/lib/md/local-movies'
{ name: 'movie', type: 'document', icon: MovieIcon, fields: [ { title: 'Title', name: 'title', type: 'string' }, { title: 'Release Date', name: 'releaseDate', type: 'date' } ], preview: { select: { title: 'title', subtitle: 'releaseDate' } } }

Previous: Previews / List ViewsNext: Previewing Block Content