From 3ddf969fb8a92c43dd36a2f6ddb4a6a513a350fc Mon Sep 17 00:00:00 2001 From: briandennis Date: Sun, 18 Jun 2017 22:05:13 -0700 Subject: [PATCH] add basic render function to copy button --- components/CopyButton.js | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/components/CopyButton.js b/components/CopyButton.js index 1a96693..0ce77f4 100644 --- a/components/CopyButton.js +++ b/components/CopyButton.js @@ -1,12 +1,22 @@ import React from 'react' +import Button from './Button' + // constants +const BUTTON_COLOR = '#84ACFC' + const STATUS = { IDLE: 'IDLE', LOADING: 'LOADING', DEBOUNCED: 'DEBOUNCED' } +const textMap = { + [STATUS.IDLE]: 'Copy Imgur Link', + [STATUS.LOADING]: 'Loading...', + [STATUS.DEBOUNCED]: 'Coppied' +} + class CopyButton extends React.Component { constructor(props) { super(props) @@ -15,4 +25,18 @@ class CopyButton extends React.Component { status: STATUS.IDLE } } -} \ No newline at end of file + + handleClick () { + switch (this.state.status) + } + + render () { + return ( +
+
+ ) + } +} + +export default CopyButton \ No newline at end of file