Sha256: 8252470b66c078c09062c07b391611ad901d5a4a1e365ced693be113d8ee5546

Contents?: true

Size: 751 Bytes

Versions: 35

Compression:

Stored size: 751 Bytes

Contents

- type ||= "rails"
- file_name = type == "rails" ? "_#{key}.html.erb" : "_#{key}.jsx"
- contents = File.read("#{Playbook::Engine.root}/app/pb_kits/playbook/pb_#{@kit_examples[:kit]}/docs/#{file_name}")

.pb--kit-example
  = pb_rails("caption", props: { text: item })
  br
  - if type == "rails"
    = render partial: "playbook/pb_#{@kit_examples[:kit]}/docs/#{key}"
  - elsif type == "react"
    = pb_react(key.camelize)
  br

.pb--codeControls
  ul
    li
      a href="#" data-toggle="code_example" Code Example

.pb--codeCopy data-action="toggle" data-togglable="code_example"
  a.pb--close-toggle href="#" data-toggle="false" Close
  - if type == "rails"
    = raw rouge(contents, "erb")
  - elsif type == "react"
    = raw rouge(contents, "erb")

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
playbook_ui-2.9.1 app/pb_kits/playbook/config/_kit_ui.html.slim
playbook_ui-2.9.0 app/pb_kits/playbook/config/_kit_ui.html.slim
playbook_ui-2.8.9 app/pb_kits/playbook/config/_kit_ui.html.slim
playbook_ui-2.8.8 app/pb_kits/playbook/config/_kit_ui.html.slim
playbook_ui-2.8.7 app/pb_kits/playbook/config/_kit_ui.html.slim
playbook_ui-2.8.6 app/pb_kits/playbook/config/_kit_ui.html.slim
playbook_ui-2.8.5 app/pb_kits/playbook/config/_kit_ui.html.slim
playbook_ui-2.8.4 app/pb_kits/playbook/config/_kit_ui.html.slim
playbook_ui-2.8.3 app/pb_kits/playbook/config/_kit_ui.html.slim
playbook_ui-2.8.1 app/pb_kits/playbook/config/_kit_ui.html.slim
playbook_ui-2.7.2 app/pb_kits/playbook/config/_kit_ui.html.slim
playbook_ui-2.7.1 app/pb_kits/playbook/config/_kit_ui.html.slim
playbook_ui-2.7.0 app/pb_kits/playbook/config/_kit_ui.html.slim
playbook_ui-2.6.0 app/pb_kits/playbook/config/_kit_ui.html.slim
playbook_ui-2.5.0 app/pb_kits/playbook/config/_kit_ui.html.slim