Repository: recharts/recharts
File: storybook/stories/API/props/TooltipArgTypes.tsx (TypeScript)

Code before:
  defaultIndex: {
    description: 'The index where the Tooltip should appear *before* the user has interacted with the chart.',
    control: {
      type: 'text',
    },
  },
  separator: {
    description: 'The separator between name and value.',
    defaultValue: ' : ',
    table: {
      type: { summary: 'string' },
      category: 'Content',
    },
  },
  offset: {
    description: `Gap (in px) between the position of tooltip and the active position.
    When a number is provided, the same offset is applied to both horizontal and vertical axes.
    When a Coordinate object is provided, you can specify different offsets for each axis.
    The active position depends on the data point, and mouse cursor position.
    The offset can be negative.`,
    defaultValue: 10,
    table: {
      type: {
        summary: 'number | Coordinate',
        detail: 'number | { x: number, y: number }',
      },
      category: 'Position',
    },
  },
  filterNull: {
    description: "When an item of the payload has value null or undefined, this item won't be displayed.",
    table: { type: { summary: 'boolean' }, category: 'Content' },
    defaultValue: true,
  },
  itemStyle: {
    description: 'The style of default tooltip content item which is a li element.',
    defaultValue: {},
    table: { type: { summary: 'Object' }, category: 'Styles' },
  },
  wrapperStyle: {
    description: 'The style of tooltip wrapper which is a dom element.',
    defaultValue: {},
    table: { type: { summary: 'Object' }, category: 'Styles' },
  },
  contentStyle: {
    description: 'The style of tooltip content which is a dom element.',
    defaultValue: {},
    table: { type: { summary: 'Object' }, category: 'Styles' },
  },
  labelStyle: {
    description: 'The style of default tooltip label which is a p element.',

Review comment (suggestion):
  I couldn't find a way to support both number and object types in Storybook's control tab at the same time. Also, it seems like other props with object types don't get edited properly either. Am I missing something here?

<img width="3042" height="2062" alt="image" src="https://github.com/user-attachments/assets/e377c5e5-deb4-4032-acf2-f10c755f4bad" />



Code after:
  defaultIndex: {
    description: 'The index where the Tooltip should appear *before* the user has interacted with the chart.',
    control: {
      type: 'text',
    },
  },
  separator: {
    description: 'The separator between name and value.',
    defaultValue: ' : ',
    table: {
      type: { summary: 'string' },
      category: 'Content',
    },
  },
  offset: {
    description: `Gap (in px) between the position of tooltip and the active position.
    When a number is provided, the same offset is applied to both horizontal and vertical axes.
    When a Coordinate object is provided, you can specify different offsets for each axis.
    The active position depends on the data point, and mouse cursor position.
    The offset can be negative.`,
    defaultValue: 10,
    table: {
      type: { summary: 'number' },
      category: 'Position',
    },
  },
  filterNull: {
    description: "When an item of the payload has value null or undefined, this item won't be displayed.",
    table: { type: { summary: 'boolean' }, category: 'Content' },
    defaultValue: true,
  },
  itemStyle: {
    description: 'The style of default tooltip content item which is a li element.',
    defaultValue: {},
    table: { type: { summary: 'Object' }, category: 'Styles' },
  },
  wrapperStyle: {
    description: 'The style of tooltip wrapper which is a dom element.',
    defaultValue: {},
    table: { type: { summary: 'Object' }, category: 'Styles' },
  },
  contentStyle: {
    description: 'The style of tooltip content which is a dom element.',
    defaultValue: {},
    table: { type: { summary: 'Object' }, category: 'Styles' },
  },
  labelStyle: {
    description: 'The style of default tooltip label which is a p element.',
    defaultValue: {},
    table: { type: { summary: 'Object' }, category: 'Styles' },
  },