diff --git a/playbook/app/pb_kits/playbook/pb_home_address_street/none_emphasis.html.erb b/playbook/app/pb_kits/playbook/pb_home_address_street/none_emphasis.html.erb new file mode 100644 index 0000000000..c5b28b67f3 --- /dev/null +++ b/playbook/app/pb_kits/playbook/pb_home_address_street/none_emphasis.html.erb @@ -0,0 +1,32 @@ +<%= pb_rails "body", props: { + classname: "pb_home_address_street_address", + size: 4, + text: object.address_house_style, + dark: object.dark +} %> +<%= pb_rails "body", props: { + classname: "pb_home_address_street_address", + size: 4, + text: object.address_house_style2, + dark: object.dark +} %> +<%= pb_rails "body", props: { + color: "light", + text: object.city_state_zip, + dark: object.dark +} %> + +<% if object.home_id %> + <%= pb_rails("hashtag", props: { + text: "#{object.home_id}", + url: object.home_url || "#", + type: "home", + dark: object.dark, + classname: "home-hashtag", + new_window: object.new_window, + target: object.target_option}) %> +<% end %> + +<%= pb_rails "body", props: { color: "light", tag: "span", dark: object.dark } do %> + <%= object.territory %> +<% end %> diff --git a/playbook/app/pb_kits/playbook/pb_home_address_street/none_emphasis.rb b/playbook/app/pb_kits/playbook/pb_home_address_street/none_emphasis.rb new file mode 100644 index 0000000000..e3106e96a1 --- /dev/null +++ b/playbook/app/pb_kits/playbook/pb_home_address_street/none_emphasis.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +module Playbook + module PbHomeAddressStreet + class NoneEmphasis < Playbook::KitBase + prop :address_house_style + prop :address_house_style2 + prop :city_state_zip + prop :home_id, type: Playbook::Props::Number + prop :home_url + prop :new_window, type: Playbook::Props::Boolean, + default: false + prop :target + prop :territory + prop :dark, type: Playbook::Props::Boolean, + default: false + + def target_option + if target && home_url + target + elsif new_window + "_blank" + else + "_self" + end + end + end + end +end