defmodule MoonWeb.Pages.Components.RadioButtonPage do
@moduledoc false
use MoonWeb, :live_view
alias Moon.Components.Button
alias Moon.Components.RadioButton
alias Moon.Components.ErrorTag
alias Moon.Components.Field
alias Moon.Components.Form
alias Moon.Autolayouts.TopToDown
alias MoonWeb.Components.ExampleAndCode
alias MoonWeb.Components.Page
alias MoonWeb.Components.ComponentPageDescription
alias MoonWeb.Components.PropsTable
alias MoonWeb.Pages.Tutorials.AddDataUsingForm.User
alias MoonWeb.Components.Facing.DeprecationWarning
data(breadcrumbs, :any,
default: [
%{
to: "#",
name: "Components v1"
},
%{
to: "/components/radio-button",
name: "RadioButton"
}
]
)
data(props_info_array, :list,
default: [
%{
:name => ~c"id",
:type => ~c"string",
:required => ~c"Yes",
:default => ~c"-",
:description => ~c"Unique element's identifier"
},
%{
:name => ~c"default",
:type => ~c"slot",
:required => ~c"Yes",
:default => ~c"-",
:description => ~c"Represent a caption for an item"
},
%{
:name => ~c"field",
:type => ~c"atom",
:required => ~c"Yes",
:default => ~c"-",
:description => ~c"Field name for underlying surface radio button component"
},
%{
:name => ~c"aria_label",
:type => ~c"-",
:required => ~c"-",
:default => ~c"-",
:description => ~c"TODO - Defines a string value that labels the current element"
},
%{
:name => ~c"checked",
:type => ~c"boolean",
:required => ~c"No",
:default => ~c"false",
:description =>
~c"A Boolean indicating whether or not this radio button is the default-selected item in the group"
},
%{
:name => ~c"click",
:type => ~c"event",
:required => ~c"Yes",
:default => ~c"-",
:description => ~c"Event handler"
}
]
)
def render(assigns) do
~F"""