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