defmodule MedicodeWeb.Storybook.KeywordHighlighter do use PhoenixStorybook.Story, :component def function, do: &MedicodeWeb.Components.KeywordHighlighter.highlight/1 def variations do [ %Variation{ id: :default, attributes: %{ text: " This 55-year-old man with known coronary artery disease comes for a follow-up visit today. ", keywords: [ %{ score: 0.92, label: "known coronary artery disease" }, %{score: 0.77, label: "visit today"} ] } } ] end end