import React from 'react' ; import { AuthType } from 'teleport/services/user' ; import { Kubes } from './Kubes' ; import { State } from './useKubes' ; import { kubes } from './fixtures' ; export default { title : 'Teleport/Kubes' , } ; export const Loaded = ( ) => < Kubes { ... props } / > ; export const Empty = ( ) => < Kubes { ... props } kubes = { [ ] } / > ; export const EmptyReadOnly = ( ) => ( < Kubes { ... props } kubes = { [ ] } canCreate = { false } / > ) ; export const Loading = ( ) => ( < Kubes { ... props } attempt = { { status : 'processing' } } />); export const Failed = ( ) => ( < Kubes { ... props } attempt = { { status : 'failed' , statusText : 'server error' } } />); const props = { attempt : { status : 'success' } , kubes : kubes , username : 'sam' , authType : 'local' as AuthType , clusterId : 'im-a-cluster' , isLeafCluster : false , canCreate : true , } ;