import { experimentOn } from '@islavi/ng2-component-lab';
const valueChange = (value: any): void => {
console.log('The value was changed! >>>>', value);
};
export default experimentOn('Input')
.group("Input",[
{
id: 'normalInput',
showSource: true,
title: 'Normal input',
description: 'Normal input',
template: `
`
},
{
id: 'disabledInput',
showSource: true,
title: 'Disabled input',
description: 'Disabled input',
template: `
`
},
{
id: 'InputTypeNumber',
showSource: true,
title: 'Input type number',
description: 'Input type number',
template: `
`
},
{
id: 'Input required',
title: 'Input required',
description: 'Input required (this add red * to the label, but does not perform validation, use sdc-validation for validation)',
showSource: true,
template: `
`
},
{
id: 'inputWithMaxLength',
title: 'Input with max length',
description: 'Input with max length',
showSource: true,
template: `
`
},
{
id: 'inputWithPlaceholder',
title: 'Input with placeholder, custom class, and tests ID',
description: 'Input with placeholder',
showSource: true,
template: `
`
},
{
id: 'inputWithDebounce',
title: 'Input with debounce time',
description: `
On value change event code:
const valueChange = (value: any): void => {
console.log('The value was changed! >>>>', value);
};
This event will happen 5 sec after the change
`,
showSource: true,
context: {
changeEvent: valueChange
},
template: `
`
}]);