-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
playbook/app/pb_kits/playbook/pb_home_address_street/none_emphasis.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 %> | ||
<small><%= object.territory %></small> | ||
<% end %> |
29 changes: 29 additions & 0 deletions
29
playbook/app/pb_kits/playbook/pb_home_address_street/none_emphasis.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |