import React from 'react' ; import { Databases } from './Databases' ; import { State } from './useDatabases' ; import { databases } from './fixtures' ; export default { title : 'Teleport/Databases' , } ; export const Loaded = ( ) => < Databases { ... props } / > ; export const Empty = ( ) => < Databases { ... props } databases = { [ ] } / > ; export const EmptyReadOnly = ( ) => ( < Databases { ... props } databases = { [ ] } canCreate = { false } / > ) ; export const Loading = ( ) => ( < Databases { ... props } attempt = { { status : 'processing' } } />); export const Failed = ( ) => ( < Databases { ... props } attempt = { { status : 'failed' , statusText : 'Server Error' } } />); const props = { attempt : { status : 'success' } , databases , clusterId : 'im-a-cluster' , isLeafCluster : false , isEnterprise : false , canCreate : true , isAddDialogVisible : false , hideAddDialog : ( ) => null , showAddDialog : ( ) => null , username : 'sam' , version : '6.1.3' , authType : 'local' , } ;