Renders a switch as a button.
If you want to render a switch as part of a form, use the input/1
component
with the type "switch"
instead.
Note that this component only renders a button with a label, a state, and
<span>
with the class switch-control
. You will need to style the switch
control span with CSS in order to give it the appearance of a switch.
<.switch
label="Subscribe"
checked={true}
phx-click="toggle-subscription"
/>