Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 503 Bytes

custom-value.stories.mdx

File metadata and controls

17 lines (12 loc) · 503 Bytes

import { Meta } from "@storybook/addon-docs";

🎛 Custom Value Renderer

Optionally customise value renderer view by passing valueRenderer prop

const customValueRenderer = (selected, _options) => {
  return selected.length
    ? selected.map(({ label }) => "✔️ " + label)
    : "😶 No Items Selected";
};

Custom Value Renderer