import { StoryFn, Meta } from '@storybook/vue3' import { ref } from 'vue' import VueSlider from '../../../lib' export default { title: 'props/tooltipFormatter', parameters: { docs: { description: { component: ` - **type**:\`TooltipFormatter | Array\` \`\`\`ts type TooltipFormatter = string | (val: Value) => string \`\`\` - **Default**: \`undefined\` - **Usage**: Format the value of the Tooltip. When the type is \`string\`, \`{value}\` will be replaced with the value of Tooltip. \`\`\`html \`\`\` `, }, }, }, } as Meta export const tooltipFormatter: StoryFn = args => ({ components: { VueSlider }, setup() { const value1 = ref(50) const value2 = ref('a') return { value1, value2, args } }, template: `
`, }) tooltipFormatter.storyName = 'tooltipFormatter' tooltipFormatter.args = { tooltipFormatter: '{value}%', }