defmodule OctantisWeb.Components.Polaris.Choice do @moduledoc """ Consumed by Checkbox and Radio button. Undocumented by Shopify. ## See - https://github.com/Shopify/polaris/blob/main/polaris-react/src/components/Choice/Choice.tsx - https://github.com/Shopify/polaris/blob/main/polaris-react/src/components/Collapsible/Collapsible.tsx """ use OctantisWeb.Core, :component import_polaris_components([:text, :inline_error]) import OctantisWeb.Core require OctantisWeb.Core @doc @moduledoc attr :id, :string, doc: "A unique identifier for the choice" attr :label, :string, doc: "Label for the choice" attr :disabled, :boolean, doc: "Whether the associated form control is disabled" attr :label_hidden, :boolean, doc: "Visually hide the label" # attr :onClick, ): void,, doc: "Callback when clicked" attr :label_class, :string, default: nil, doc: "Added to the label element" attr :fill, :list, default: nil, doc: "Grow to fill the space. Equivalent to width: 100%; height: 100%" attr :error, :string, doc: "Display an error message" attr :help_text, :string, doc: "Additional text to aide in use. Will add a wrapping