import React from 'react' ; import { Nodes } from './Nodes' ; import { State } from './useNodes' ; import { nodes } from './fixtures' ; export default { title : 'Teleport/Nodes' , } ; export const Loaded = ( ) => < Nodes { ... props } / > ; export const Empty = ( ) => < Nodes { ... props } nodes = { [ ] } / > ; export const EmptyReadOnly = ( ) => ( < Nodes { ... props } nodes = { [ ] } canCreate = { false } / > ) ; export const Loading = ( ) => ( < Nodes { ... props } attempt = { { status : 'processing' } } />); export const Failed = ( ) => ( < Nodes { ... props } attempt = { { status : 'failed' , statusText : 'some error message' } } />); const props = { nodes , isLeafCluster : false , canCreate : true , attempt : { status : 'success' } , getNodeLoginOptions : ( ) => [ { login : 'root' , url : 'fd' } ] , startSshSession : ( ) => null , isAddNodeVisible : false , hideAddNode : ( ) => null , showAddNode : ( ) => null , clusterId : 'im-a-cluster' , } ;