Skip to content

Commit

Permalink
Make prop name more explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
guyathomas committed Dec 4, 2019
1 parent 6733e36 commit d8bdd73
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/gatsby-remark-autolink-headers/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

## [2.1.20](2019-12-02)

Allow `after` option where the link will appear inline after the header text
Allow `isIconAfterH` option where the anchor will appear inline after the header text

## [2.1.19](https://github.com/gatsbyjs/gatsby/compare/gatsby-remark-autolink-headers@2.1.18...gatsby-remark-autolink-headers@2.1.19) (2019-11-26)

Expand Down
4 changes: 2 additions & 2 deletions packages/gatsby-remark-autolink-headers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Note: if you are using `gatsby-remark-prismjs`, make sure that it’s listed aft
- `maintainCase`: Boolean. Maintains the case for markdown header (optional)
- `removeAccents`: Boolean. Remove accents from generated headings IDs (optional)
- `enableCustomId`: Boolean. Enable custom header IDs with `{#id}` (optional)
- `after`: Boolean. Enable the link icon to inline at the end of the header text
- `isIconAfterH`: Boolean. Enable the anchor icon to be inline at the end of the header text

```javascript
// In your gatsby-config.js
Expand All @@ -76,7 +76,7 @@ module.exports = {
className: `custom-class`,
maintainCase: true,
removeAccents: true,
after: true,
isIconAfterH: true,
},
},
],
Expand Down
4 changes: 2 additions & 2 deletions packages/gatsby-remark-autolink-headers/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = (
maintainCase = false,
removeAccents = false,
enableCustomId = false,
after = true,
isIconAfterH = true,
}
) => {
slugs.reset()
Expand Down Expand Up @@ -67,7 +67,7 @@ module.exports = (
data: {
hProperties: {
"aria-label": `${label} permalink`,
class: `${className} ${after ? `after` : `before`}`,
class: `${className} ${isIconAfterH ? `after` : `before`}`,
},
hChildren: [
{
Expand Down

0 comments on commit d8bdd73

Please sign in to comment.