Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit 52dfb9c

Browse files
until we come up with a good way to document standard rels e.g. 'next' or 'curies' we can't show a help button
1 parent 5102523 commit 52dfb9c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/HyperMediaControls/Dialog.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ const styles = theme => ({
2020

2121
const SlideUp = props => <Slide direction={'up'} {...props} />;
2222

23+
const isStandardRel = rel => rel.indexOf(':') === -1;
24+
2325
export default withStyles(styles)(
2426
class HyperMediaDialog extends PureComponent {
2527
state = {
@@ -70,7 +72,9 @@ export default withStyles(styles)(
7072
<DialogTitle>{title}</DialogTitle>
7173
<DialogContent>{children}</DialogContent>
7274
<DialogActions>
73-
<HelpButton rel={rel} curies={curies} />
75+
{!isStandardRel(rel) && (
76+
<HelpButton rel={rel} curies={curies} />
77+
)}
7478
<Button onClick={this._onClose}>{'Cancel'}</Button>
7579
<Button
7680
variant={'contained'}

0 commit comments

Comments
 (0)