import React from 'react' import { PatternFormat, NumericFormat, NumberFormatBase } from './index' export default { title: 'molecules/PatternFormat', component: PatternFormat, argTypes: { format: { control: { type: 'text' } }, patternChar: { control: { type: 'text' } }, value: { control: { type: 'text' } }, allowLeadingZeros: { control: { type: 'boolean' } }, thousandSeparator: { control: { type: 'text' } }, prefix: { control: { type: 'text' } }, suffix: { control: { type: 'text' } } } } const Template: React.FC = () => { return } export const TemplatePatternFormat = Template.bind({}) const TemplateNumeric: React.FC = () => { return } export const TemplateNumericFormat = TemplateNumeric.bind({}) // suffix const TemplateNumericSuffix: React.FC = () => { return } export const TemplateNumericFormatSuffix = TemplateNumericSuffix.bind({}) // MyCustomNumberFormat export const format = (numStr: string): number | bigint | string => { if (numStr === '') return '' return new Intl.NumberFormat('es-CO', { style: 'currency', currency: 'COP', currencyDisplay: 'symbol', // Puedes cambiar esto a 'code' o 'name' segĂșn prefieras maximumFractionDigits: 0 }).format(Number(numStr)) } const TemplateMyCustomNumberFormat: React.FC = () => { return } export const TemplateCustomNumberFormat = TemplateMyCustomNumberFormat.bind({}) // mask const TemplateMask: React.FC = () => { return } export const TemplateMaskFormat = TemplateMask.bind({}) const TemplateCreditCard: React.FC = () => { return } export const TemplateCreditCardFormat = TemplateCreditCard.bind({})