import React from 'react' import { type Meta } from '@storybook/react-vite' import { activeCellClass } from '../../services/HelperServiceTyped' import { DocsTemplate } from '../../../.storybook' import { type ActiveCellClassProps } from '../../services/HelperServiceTyped' type ExampleProps = Omit & { activeName: 'box1' | 'box2' | 'box3' } export const Example = (args: ExampleProps): React.JSX.Element => { const { activeName } = args return ( <>

The active box will be highlighted to show the result of the{' '} activeCellClass function. You can change which box is highlighted in the ArgsTable below.

) } Example.storyName = 'activeCellClass' Example.args = { activeName: 'box1', } export default { title: 'Helper Functions/activeCellClass', component: Example, argTypes: { cells: { control: false, }, color: { control: false, }, }, parameters: { viewMode: 'docs', previewTabs: { canvas: { hidden: true }, }, docs: { page: () => ( <> Output: Highlights the column that has the value \`map_price\` or \`change__map_price\``} description='A function used to return a color based on the active column in a table.' infoBullets={[ activeCellClass is used when you are using the{' '} CustomTable. You will need this in order to properly highlight the active column (the column that is being sorted). , ]} /> ), }, }, } as Meta