Sha256: 1292040cc366e246dfd3ce4902b103f9dbf00c1f248a8d67b0d9ed4bc0549ddf

Contents?: true

Size: 682 Bytes

Versions: 12

Compression:

Stored size: 682 Bytes

Contents

<div x-data="{changed: false, applyChange(){ this.value = this.$refs.input.value; this.changed = false; }}">

  <div x-on:change.stop="changed = ($event.target.value !== value)" class="flex items-center gap-2">
    <%= text_field_tag(name, value,
      **input_options,
      type: input,
      class: "flex-grow",
      "x-ref": "input",
      "x-on:keydown.enter.stop": "applyChange"
    ) %>

    <%= lookbook_render :button,
      icon: :check,
      tooltip: "Apply changes",
      class: "flex-none !bg-lookbook-button-bg hover:!bg-lookbook-button-bg-hover rounded-md !text-lookbook-button-text",
      "x-show": "changed",
      "x-on:click": "applyChange" %>
  </div>
</div>

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
lookbook-2.3.4 app/views/lookbook/inspector/inputs/_text_two_step.html.erb
lookbook-2.3.3 app/views/lookbook/inspector/inputs/_text_two_step.html.erb
lookbook-2.3.2 app/views/lookbook/inspector/inputs/_text_two_step.html.erb
lookbook-2.3.0 app/views/lookbook/inspector/inputs/_text_two_step.html.erb
lookbook-2.2.2 app/views/lookbook/inspector/inputs/_text_two_step.html.erb
lookbook-2.2.1 app/views/lookbook/inspector/inputs/_text_two_step.html.erb
lookbook-2.2.0 app/views/lookbook/inspector/inputs/_text_two_step.html.erb
lookbook-2.1.1 app/views/lookbook/inspector/inputs/_text_two_step.html.erb
lookbook-2.1.0 app/views/lookbook/inspector/inputs/_text_two_step.html.erb
lookbook-2.0.5 app/views/lookbook/inspector/inputs/_text_two_step.html.erb
lookbook-2.0.4 app/views/lookbook/inspector/inputs/_text_two_step.html.erb
lookbook-2.0.3 app/views/lookbook/inspector/inputs/_text_two_step.html.erb