Skip to content

Commit

Permalink
feat(tinacms): added a default MediaManager screen
Browse files Browse the repository at this point in the history
  • Loading branch information
ncphillips committed Sep 16, 2020
1 parent 3df3c55 commit dc33594
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/tinacms/src/plugins/screens/media-manager-screen.tsx
@@ -0,0 +1,12 @@
import { Folder } from '@tinacms/icons'
import { ScreenPlugin } from '@tinacms/react-screens'
import { MediaPicker } from '../../components/media-manager'

export const MediaManagerScreenPlugin: ScreenPlugin = {
__type: 'screen',
name: 'Media Manager',
Component: MediaPicker,
// TODO: New Icon with a landscape
Icon: Folder,
layout: 'fullscreen',
}
2 changes: 2 additions & 0 deletions packages/tinacms/src/tina-cms.ts
Expand Up @@ -42,6 +42,7 @@ import {
HtmlFieldPlaceholder,
DateFieldPlaceholder,
} from './plugins/fields/markdown'
import { MediaManagerScreenPlugin } from './plugins/screens/media-manager-screen'

const DEFAULT_FIELDS = [
TextFieldPlugin,
Expand Down Expand Up @@ -97,6 +98,7 @@ export class TinaCMS extends CMS {
this.fields.add(field)
}
})
this.plugins.add(MediaManagerScreenPlugin)
}

get alerts() {
Expand Down

0 comments on commit dc33594

Please sign in to comment.