module Coco class Preview < ViewComponent::Preview include Coco::Helpers protected def icon_names @_icons ||= icon_data_file = File.join(File.dirname(__FILE__), "../../config/icons.json") JSON.parse(File.read(icon_data_file)).map { _1.tr("-", "_") } end end end