Skip to content

Instantly share code, notes, and snippets.

@mmintel
Created June 21, 2018 09:12
Show Gist options
  • Save mmintel/3bbe6c0c19a867f17aafaf1c934856b3 to your computer and use it in GitHub Desktop.
Save mmintel/3bbe6c0c19a867f17aafaf1c934856b3 to your computer and use it in GitHub Desktop.
import Controller from '../shared/controller';
export default class ClipboardController extends Controller {
copy = () => {
this.model.isCopied = true;
if (this.onCopy && typeof this.onCopy === 'function') {
this.onCopy();
}
}
clear = () => {
this.model.isCopied = false;
if (this.onClear && typeof this.onClear === 'function') {
this.onClear();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment