Sha256: c129d6e208070ad6802ced6748bdbb23734c587422432bcf40d91db348ced3fb
Contents?: true
Size: 1.96 KB
Versions: 35
Compression:
Stored size: 1.96 KB
Contents
div.satis-switch data-controller='satis-switch' - if options[:label] != false = form.custom_label(attribute, options[:label], data: { action: "click->satis-switch#toggle" }) = form.hidden_field(attribute, options[:input_html].reverse_merge(value: @value ? "1" : "0", 'data-action' => 'change->satis-switch#update')) button.mt-3.mb-3.relative.inline-flex.flex-shrink-0.h-6.w-11.border-2.border-transparent.rounded-full.cursor-pointer.transition-colors.ease-in-out.duration-200.focus:outline-none.focus:ring-2.focus:ring-offset-2.focus:ring-primary-500 aria-checked="false" role="switch" type="button" data-action="click->satis-switch#toggle" data-satis-switch-target="button" class="#{@value ? 'bg-primary-600' : 'bg-gray-200'}" span.pointer-events-none.inline-block.h-5.w-5.rounded-full.bg-white.shadow.transform.ring-0.transition.ease-in-out.duration-200 aria-hidden="true" data-satis-switch-target="switch" class="#{@value ? 'translate-x-5' : 'translate-x-0' }" - if icon span.absolute.inset-0.h-full.w-full.flex.items-center.justify-center.transition-opacity aria-hidden="true" data-satis-switch-target="cross" class="#{@value ? 'opacity-0 ease-out duration-100' : 'opacity-100 ease-in duration-200' }" svg.h-3.w-3.text-gray-400 fill="none" viewbox=("0 0 12 12") path d=("M4 8l2-2m0 0l2-2M6 6L4 4m2 2l2 2") stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" / span.absolute.inset-0.h-full.w-full.flex.items-center.justify-center.transition-opacity aria-hidden="true" data-satis-switch-target="check" class="#{@value ? 'opacity-100 ease-in duration-200' : 'opacity-0 ease-out duration-100' }" svg.h-3.w-3.text-primary-600 fill="currentColor" viewbox=("0 0 12 12") path d=("M3.707 5.293a1 1 0 00-1.414 1.414l1.414-1.414zM5 8l-.707.707a1 1 0 001.414 0L5 8zm4.707-3.293a1 1 0 00-1.414-1.414l1.414 1.414zm-7.414 2l2 2 1.414-1.414-2-2-1.414 1.414zm3.414 2l4-4-1.414-1.414-4 4 1.414 1.414z") /
Version data entries
35 entries across 35 versions & 1 rubygems