Skip to content

Commit

Permalink
Solve issue - EOS-uiux-Solutions#45 Solving issues EOS-uiux-Solutions#45
Browse files Browse the repository at this point in the history
 - Adding a functionality that lets the user know when they copy an icon
  • Loading branch information
shrinishant committed Feb 24, 2022
1 parent c1ef213 commit 039715b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@
"node-sass": "^4.14.1",
"npm": "^6.14.8",
"prismjs": "^1.23.0",
"react": "^16.13.1",
"react": "^17.0.2",
"react-color": "^2.18.1",
"react-dom": "^16.13.1",
"react-gtm-module": "^2.0.11",
"react-helmet": "^6.1.0",
"react-router-dom": "^5.2.0",
"react-scripts": "^3.4.3",
"react-svg": "^11.0.41"
"react-svg": "^11.0.41",
"react-toastify": "^8.2.0"
},
"devDependencies": {
"eslint": "^6.8.0",
Expand Down
24 changes: 24 additions & 0 deletions src/components/HowToPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import React, { useState, useEffect, useContext, useRef } from 'react'
import AppContext from '../utils/AppContext'
import Button from './Button'
import IconEditor from './IconEditor'
import { ToastContainer, toast } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css';

const HowToPanel = (props) => {
const { show, close, iconName, type, iconTags } = props
Expand Down Expand Up @@ -91,10 +93,21 @@ const HowToPanel = (props) => {
onClick={() => {
document.getElementById('copy-code').select()
document.execCommand('copy')

toast.info('Copied !!!', {
position: "top-right",
autoClose: 2000,
hideProgressBar: false,
closeOnClick: true,
pauseOnHover: true,
draggable: true,
progress: undefined,
});
}}
>
<i className='eos-icons eos-18'>content_copy</i>
</Button>
<ToastContainer />
</div>
<a
target='_blank'
Expand Down Expand Up @@ -134,10 +147,21 @@ const HowToPanel = (props) => {
onClick={() => {
document.getElementById('copy-code').select()
document.execCommand('copy')

toast.info('Copied !!!', {
position: "top-right",
autoClose: 2000,
hideProgressBar: false,
closeOnClick: true,
pauseOnHover: true,
draggable: true,
progress: undefined,
});
}}
>
<i className='eos-icons eos-18'>content_copy</i>
</Button>
<ToastContainer />
</div>
<Button
primary
Expand Down

0 comments on commit 039715b

Please sign in to comment.