mirror of
https://github.com/NohamR/lanyard-profile-readme.git
synced 2026-05-26 13:41:32 +00:00
Feat: Copy button
This commit is contained in:
@@ -37,6 +37,7 @@ export default function Home() {
|
|||||||
[](https://discord.com/users/{userId})
|
)](https://discord.com/users/{userId})
|
||||||
</Output>
|
</Output>
|
||||||
|
<Copy onClick={copy}>{copyState}</Copy>
|
||||||
<Example
|
<Example
|
||||||
src={`https://lanyard-profile-readme.vercel.app/api/${userId}`}
|
src={`https://lanyard-profile-readme.vercel.app/api/${userId}`}
|
||||||
alt="[Please provide a valid user ID!]"
|
alt="[Please provide a valid user ID!]"
|
||||||
@@ -132,10 +133,30 @@ const Output = styled.div`
|
|||||||
box-shadow: 0px 3px 15px rgba(0, 0, 0, 0.2);
|
box-shadow: 0px 3px 15px rgba(0, 0, 0, 0.2);
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
const Copy = styled.button`
|
||||||
|
position: absolute;
|
||||||
|
right: 35px;
|
||||||
|
font-size: 0.9em;
|
||||||
|
padding: 5px 25px;
|
||||||
|
width: 103px;
|
||||||
|
border-radius: 6px;
|
||||||
|
cursor: pointer;
|
||||||
|
border: none;
|
||||||
|
color: #aaabaf;
|
||||||
|
backdrop-filter: blur(50px);
|
||||||
|
box-shadow: 0px 3px 15px rgba(0, 0, 0, 0.2);
|
||||||
|
background: rgb(0, 0, 0, 0.1);
|
||||||
|
transition: background ease-in-out 0.2s;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: rgb(0, 0, 0, 0.4);
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
const Example = styled.img`
|
const Example = styled.img`
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0 auto;
|
margin: 70px auto 0px;
|
||||||
padding: 15px 20px;
|
padding: 0 20px 15px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
filter: drop-shadow(0px 3px 15px rgba(0, 0, 0, 0.2));
|
filter: drop-shadow(0px 3px 15px rgba(0, 0, 0, 0.2));
|
||||||
`;
|
`;
|
||||||
|
|||||||
Reference in New Issue
Block a user