Skip to content

Commit

Permalink
Rename prop to something more specific and descriptive
Browse files Browse the repository at this point in the history
  • Loading branch information
alicebartlett committed Jan 8, 2020
1 parent f590a43 commit 43c4cd7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions components/x-podcast-launchers/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ All `x-` components are designed to be compatible with a variety of runtimes, no

### Properties

Feature | Type | Required | Notes
----------------------|----------|----------|------------------
`acastRSSHost` | String | Yes | e.g. 'https://acast.access.com'
`conceptId` | String | Yes |
`renderFollowButton` | Function | No | Optional render prop for the follow button
`isApp` | Boolean | No | Defaults to true. Currently only used to hide podcast app launchers on wide screen + desktop where the links do nothing because there is no app to launch.
Feature | Type | Required | Notes
----------------------------|----------|----------|------------------
`acastRSSHost` | String | Yes | e.g. 'https://acast.access.com'
`conceptId` | String | Yes |
`renderFollowButton` | Function | No | Optional render prop for the follow button
`showLinksOnAllBreakpoints` | Boolean | No | Defaults to true. Used to hide podcast app launchers on wide screen + desktop where the links do nothing because there is no app to launch.

Additional props such as the `conceptName` may be required by x-follow-button. Documentation for these is available over in the component's readme.
4 changes: 2 additions & 2 deletions components/x-podcast-launchers/src/PodcastLaunchers.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ class PodcastLaunchers extends Component {

render() {
const { rssUrl } = this.state;
const { conceptId, conceptName, csrfToken, isFollowed, renderFollowButton, isApp } = this.props
const { conceptId, conceptName, csrfToken, isFollowed, renderFollowButton, showLinksOnAllBreakpoints } = this.props
const followButton = typeof renderFollowButton === 'function' ? renderFollowButton : defaultFollowButtonRender;

return rssUrl && (
<div className={styles.container} data-trackable='podcast-launchers'>
<h2 className={styles.headingChooseApp}>Subscribe via your installed podcast app</h2>
<ul className={styles.podcastAppLinksWrapper}>
{generateAppLinks(rssUrl).map(({ name, url, trackingId }) => (
<li key={name} className={isApp ? "" : styles.hidePodcastLinkAtWide}>
<li key={name} className={showLinksOnAllBreakpoints ? "" : styles.hidePodcastLinkAtWide}>
<a
href={url}
className={styles.podcastAppLink}
Expand Down
2 changes: 1 addition & 1 deletion components/x-podcast-launchers/stories/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exports.data = {
csrfToken: 'token',
acastRSSHost: 'https://access.acast.com',
acastAccessToken: 'abc-123',
isApp: false,
showLinksOnAllBreakpoints: true,
};

// This reference is only required for hot module loading in development
Expand Down

0 comments on commit 43c4cd7

Please sign in to comment.