import React from 'react' import { type Meta } from '@storybook/react-vite' import { snakeCaseToTitle } from '../../services/HelperServiceTyped' import { DocsTemplate } from '../../../.storybook' export const Example = (args: { /** The string that needs to be passed into this function. */ string: string }): React.JSX.Element => { return <>{snakeCaseToTitle(args.string)} } Example.storyName = 'snakeCaseToTitle' Example.args = { string: 'hello_there_world!', } export default { title: 'Helper Functions/snakeCaseToTitle', component: Example, parameters: { viewMode: 'docs', previewTabs: { canvas: { hidden: true }, }, docs: { page: () => ( <> snakeCaseToTitle is helpful when you want to use a{' '} key from an object as the display value in the UI. , Note: this only works with strings that are snake case. For example: this_is_snake_case. , ]} /> ), }, }, } as Meta