Skip to content

Commit

Permalink
Create none emphasis view and model
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomm1128 committed Dec 12, 2024
1 parent eee2a15 commit 37d44f5
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
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 %>
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

0 comments on commit 37d44f5

Please sign in to comment.