import React from 'react' ; import { EuiCodeBlock , EuiFormLabel , EuiSpacer } from '@elastic/eui' ; interface ApiKeyProps { apiKey : string ; label ? : string ; } export const ApiKey = ( { apiKey , label } ) => ( < > { label && ( < > < EuiFormLabel > { label } < /EuiFormLabel> < EuiSpacer size = "xs" / > < />)} < EuiCodeBlock language = "bash" fontSize = "m" paddingSize = "m" color = "dark" isCopyable > { apiKey } < /EuiCodeBlock> < />);