Skip to content

Commit

Permalink
[example-studio] Adding icons in example-studio. Also uses correct vi…
Browse files Browse the repository at this point in the history
…sion plugin (#581)
  • Loading branch information
Kristoffer J. Sivertsen authored Feb 9, 2018
1 parent 41cd02a commit 9b6e933
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/example-studio/config/.checksums
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"#": "Used by Sanity to keep track of configuration file checksums, do not delete or modify!",
"@sanity/default-layout": "bb034f391ba508a6ca8cd971967cbedeb131c4d19b17b28a0895f32db5d568ea",
"@sanity/data-aspects": "ba5c2649cc1b1c39ae92b7daf2661f95fa79d7325073ffd410245d2717b240e9",
"@sanity/storybook": "526dea3b461fda217e7150d12395d0ec639cba0155c05a084b85bcf2c44995a3"
"@sanity/storybook": "526dea3b461fda217e7150d12395d0ec639cba0155c05a084b85bcf2c44995a3",
"@sanity/default-login": "6fb6d3800aa71346e1b84d95bbcaa287879456f2922372bb0294e30b968cd37f"
}
7 changes: 7 additions & 0 deletions packages/example-studio/config/@sanity/default-login.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"providers": {
"mode": "append",
"redirectOnSingle": false,
"entries": []
}
}
4 changes: 2 additions & 2 deletions packages/example-studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@sanity/desk-tool": "^0.125.5",
"@sanity/form-builder": "^0.125.5",
"@sanity/storybook": "^0.125.4",
"@sanity/vision": "^0.125.5",
"bio-pv": "^1.8.1",
"date-fns": "^1.29.0",
"fetch": "^1.1.0",
Expand All @@ -38,8 +39,7 @@
"prop-types": "^15.6.0",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-icons": "^2.2.5",
"sanity-plugin-vision": "^0.116.2"
"react-icons": "^2.2.5"
},
"devDependencies": {
"rimraf": "^2.6.2"
Expand Down
2 changes: 2 additions & 0 deletions packages/example-studio/schemas/author.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import AuthorPreview from '../parts/AuthorPreview'
import icon from 'react-icons/lib/md/person'

export default {
name: 'author',
type: 'document',
title: 'Author',
icon,
preview: {
select: {
title: 'name',
Expand Down
2 changes: 2 additions & 0 deletions packages/example-studio/schemas/blogpost.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import distanceInWordsToNow from 'date-fns/distance_in_words_to_now'
import BookIcon from 'react-icons/lib/fa/book'

const pickFirst = (obj, keys) => {
if (!obj || typeof obj !== 'object') {
Expand All @@ -14,6 +15,7 @@ export default {
name: 'blogpost',
type: 'document',
title: 'Blogpost',
icon: BookIcon,
preview: {
select: {
title: 'title',
Expand Down
2 changes: 2 additions & 0 deletions packages/example-studio/schemas/customObject.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import CustomObjectInput from '../components/CustomObjectInput'
import icon from 'react-icons/lib/md/extension'

export default {
type: 'document',
name: 'customObject',
title: 'Custom object',
icon,
fields: [
{
name: 'identifier',
Expand Down
3 changes: 3 additions & 0 deletions packages/example-studio/schemas/proteinTest.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import icon from 'react-icons/lib/go/microscope'

export default {
name: 'proteinTest',
title: 'Protein Test',
type: 'document',
icon,
fields: [
{
name: 'title',
Expand Down
3 changes: 3 additions & 0 deletions packages/example-studio/schemas/richText.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import icon from 'react-icons/lib/fa/font'

export default {
name: 'richText',
type: 'document',
title: 'Rich text',
icon,
fields: [
{
name: 'title',
Expand Down
2 changes: 2 additions & 0 deletions packages/example-studio/schemas/videoEmbed.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import VideoEmbedPreview from '../components/VideoEmbedPreview/VideoEmbedPreview'
import VideoEmbedInput from '../components/VideoEmbedInput'
import icon from 'react-icons/lib/fa/video-camera'

export default {
type: 'object',
name: 'videoEmbed',
title: 'Video',
icon,
fields: [
{
name: 'service',
Expand Down

0 comments on commit 9b6e933

Please sign in to comment.