Skip to content

Commit

Permalink
Merge pull request primer#674 from primer/octicon_rails_view_component
Browse files Browse the repository at this point in the history
Changing rails helper example to view component
  • Loading branch information
jonrohan authored Oct 14, 2021
2 parents df2ad7b + 87c8d0c commit ac87d39
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 38 deletions.
4 changes: 2 additions & 2 deletions docs/content/packages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Packages
---

- [Ruby](/packages/ruby)
- [Rails](/packages/rails)
- [View Component](https://primer.style/view-components/components/octicon)
- [Jekyll](/packages/jekyll)
- [JavaScript](/packages/javascript)
- [React](/packages/react)
- [React](/packages/react)
29 changes: 0 additions & 29 deletions docs/content/packages/rails.mdx

This file was deleted.

2 changes: 0 additions & 2 deletions docs/src/@primer/gatsby-theme-doctocat/nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
children:
- title: Ruby
url: /packages/ruby
- title: Rails
url: /packages/rails
- title: Jekyll
url: /packages/jekyll
- title: JavaScript
Expand Down
10 changes: 5 additions & 5 deletions docs/src/templates/icon-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ export default function IconPage({pageContext}) {
<H2>Usage</H2>
<Paragraph>
You can use the{' '}
<Link as={GatsbyLink} to="/packages/rails">
Rails helper
</Link>
<a href="https://primer.style/view-components/components/octicon">
View Component
</a>
,{' '}
<Link as={GatsbyLink} to="/packages/jekyll">
Jekyll helper
Expand All @@ -118,8 +118,8 @@ export default function IconPage({pageContext}) {
to include Octicons on your site. Below are code examples for each:
</Paragraph>

<H3>Ruby</H3>
<Code>{`<%= octicon "${pageContext.name}", :height => ${icon.height} %>`}</Code>
<H3>Octicon View Component</H3>
<Code>{`<%= render(Primer::OcticonComponent.new(:"${pageContext.name}")) %>`}</Code>

<H3>Jekyll</H3>
<Code>{`{% octicon ${pageContext.name} height:${icon.height} %}`}</Code>
Expand Down

0 comments on commit ac87d39

Please sign in to comment.