<%= content_tag(:div, id: object.id, data: object.data, class: object.classname, **combined_html_options) do %> <% if object.label.present? %> <%= pb_rails("caption", props: {text: object.label, dark: object.dark}) %> <% end %> <% if content.present? %> <%= content %> <% if object.error %> <%= pb_rails("body", props: { dark: object.dark, status: "negative", text: object.error }) %> <% end %> <% else %> <%= text_area( :object, :method, :class => "#{object.classname}", :max_characters => object.max_characters, :name => object.name, :onkeyup => object.onkeyup, :placeholder => object.placeholder, :rows => object.rows, :value => object.value) %> <% if object.error %> <% if object.character_count %> <%= pb_rails("flex", props: { spacing: "between", vertical: "center" }) do %> <%= pb_rails("flex/flex_item") do %> <%= pb_rails("body", props: { dark: object.dark, status: "negative", text: object.error }) %> <% end %> <%= pb_rails("flex/flex_item") do %> <%= pb_rails("caption", props: { margin: "none", size: "xs", text: object.character_counter }) %> <% end %> <% end %> <% else %> <%= pb_rails("body", props: { dark: object.dark, status: "negative", text: object.error }) %> <% end %> <% else %> <%= pb_rails("caption", props: { margin: "none", size: "xs", text: object.character_counter }) %> <% end %> <% end %> <% end %>