import { whisper } from '@oliveai/ldk';
import {
Whisper,
WhisperComponentType,
} from '@oliveai/ldk/dist/whisper/types';
await whisper.create({
label: 'List Pair',
components: [
{
type: whisper.WhisperComponentType.ListPair,
copyable: true,
label: 'Label None Not Copyable',
labelCopyable: false,
onValueCopy: (error, value) => {
console.log('Copied: ', value);
},
style: whisper.Urgency.None,
value: 'Value None Copyable [Link](https://docs.oliveai.dev/)',
},
{
type: whisper.WhisperComponentType.ListPair,
copyable: true,
label: 'Label Error Copyable',
labelCopyable: true,
onLabelCopy: (error, value) => {
console.log('Copied: ', value);
},
style: whisper.Urgency.Error,
value: 'Value Error Copyable [Link](https://docs.oliveai.dev/)',
},
{
type: whisper.WhisperComponentType.ListPair,
copyable: true,
label: 'Label Success Not Copyable',
labelCopyable: false,
onValueCopy: (error, value) => {
console.log('Copied: ', value);
},
style: whisper.Urgency.Success,
value: 'Value Success Copyable [Link](https://docs.oliveai.dev/)',
},
{
type: whisper.WhisperComponentType.ListPair,
copyable: false,
label: 'Label Warning Copyable',
labelCopyable: true,
onLabelCopy: (error, value) => {
console.log('Copied: ', value);
},
style: whisper.Urgency.Warning,
value: 'Value Warning Not Copyable [Link](https://docs.oliveai.dev/)',
},
],
});