Created
June 21, 2018 09:12
-
-
Save mmintel/3bbe6c0c19a867f17aafaf1c934856b3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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