Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
make clipboard button optional for textareaclipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
cezaraugusto committed Dec 12, 2018
1 parent cc21ad1 commit 2b8e852
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions src/components/formControls/textareaClipboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,21 @@ export default class TextAreaClipboard extends React.PureComponent<Props, State>
/>
<StyledFooter>
{wordCountString} {this.wordCount}
<StyledCopyToClipboard>
<StyledText
visible={copiedStringVisible}
onAnimationEnd={this.onAnimationEnd}
>
{copiedString}
</StyledText>
<StyledClipboardButton onClick={this.onCopyToClipboard}>
<ClipboardIcon />
</StyledClipboardButton>
</StyledCopyToClipboard>
{
copiedString !== undefined
? <StyledCopyToClipboard>
<StyledText
visible={copiedStringVisible}
onAnimationEnd={this.onAnimationEnd}
>
{copiedString}
</StyledText>
<StyledClipboardButton onClick={this.onCopyToClipboard}>
<ClipboardIcon />
</StyledClipboardButton>
</StyledCopyToClipboard>
: null
}
</StyledFooter>
</StyledWrapper>
)
Expand Down

0 comments on commit 2b8e852

Please sign in to comment.