Skip to content

Commit

Permalink
refactoring to pass linter tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mferrarini committed Oct 11, 2023
1 parent d231570 commit 33e2840
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 15 deletions.
36 changes: 26 additions & 10 deletions src/MiradorShareDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,19 @@ export class MiradorShareDialog extends Component {
/>
{' '}
<CopyToClipboard text={shareLinkText}>
<Button className={classes.copyButton} variant="outlined" color="primary" aria-label="Copy link to clipboard" onClick={() => enqueueSnackbar((
<Typography variant="body1">
Link copied to clipboard!
</Typography>
), { variant: 'success' })}>Copy</Button>
<Button
className={classes.copyButton}
variant="outlined"
color="primary"
aria-label="Copy link to clipboard"
onClick={() => enqueueSnackbar((
<Typography variant="body1">
Link copied to clipboard!
</Typography>
), { variant: 'success' })}
>
Copy
</Button>
</CopyToClipboard>
</div>
<Divider />
Expand Down Expand Up @@ -191,11 +199,19 @@ export class MiradorShareDialog extends Component {
Copy & paste the resource&apos;s manifest into any IIIF viewer.
</Typography>
<CopyToClipboard text={this.dragAndDropUrl()}>
<Button className={classes.copyButton} variant="outlined" color="primary" aria-label="Copy manifest to clipboard" onClick={() => enqueueSnackbar((
<Typography variant="body1">
Manifest copied to clipboard!
</Typography>
), { variant: 'success' })}>Copy</Button>
<Button
className={classes.copyButton}
variant="outlined"
color="primary"
aria-label="Copy manifest to clipboard"
onClick={() => enqueueSnackbar((
<Typography variant="body1">
Manifest copied to clipboard!
</Typography>
), { variant: 'success' })}
>
Copy
</Button>
</CopyToClipboard>
</Grid>
</Grid>
Expand Down
18 changes: 13 additions & 5 deletions src/MiradorShareEmbed.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,19 @@ class MiradorShareEmbed extends Component {
variant="filled"
/>
<CopyToClipboard text={this.embedCode()}>
<Button className={classes.copyButton} variant="outlined" color="primary" aria-label="Copy code to clipboard" onClick={() => enqueueSnackbar((
<Typography variant="body1">
Code copied to clipboard!
</Typography>
), { variant: 'success' })}>Copy</Button>
<Button
className={classes.copyButton}
variant="outlined"
color="primary"
aria-label="Copy code to clipboard"
onClick={() => enqueueSnackbar((
<Typography variant="body1">
Code copied to clipboard!
</Typography>
), { variant: 'success' })}
>
Copy
</Button>
</CopyToClipboard>
</div>
</FormControl>
Expand Down

0 comments on commit 33e2840

Please sign in to comment.