Skip to content

Commit

Permalink
v1
Browse files Browse the repository at this point in the history
  • Loading branch information
CrispenGari committed Oct 15, 2022
0 parents commit 260c9df
Show file tree
Hide file tree
Showing 28 changed files with 49,075 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### React Emojify List

This is a web application for which list all the emojis supported by [@crispengari/react-emojify](https://github.com/CrispenGari/react-emojify).

[React Emojify List]()

### QR Code
30 changes: 30 additions & 0 deletions components/EmojiCard/EmojiCard.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.emoji__card {
width: 100px;
height: 100px;
display: flex;
flex-direction: column;
padding: 5px;
cursor: pointer;
transition: all 1s;
justify-content: center;
align-items: center;
margin: 3px;
position: relative;
border-radius: 5px;
border: 1px solid var(--main-color);
}

.emoji__card:hover {
background-color: var(--main-color);
}
.emoji__card > p {
transition: all 1ms;
background-color: var(--main-color);
color: white;
padding: 5px 10px;
position: absolute;
border-radius: 10px;
font-size: 1rem;
top: -15px;
border: 1px solid white;
}
28 changes: 28 additions & 0 deletions components/EmojiCard/EmojiCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React, { useState } from "react";
import { EmojiType } from "../../types";
import styles from "./EmojiCard.module.css";
interface Props {
emoji: EmojiType;
setShowAlert: React.Dispatch<React.SetStateAction<boolean>>;
}
const EmojiCard: React.FC<Props> = ({
emoji: { emojis, id, description },
setShowAlert,
}) => {
const copy = () => {
setShowAlert(false);
navigator.clipboard.writeText(`react@emojify-${id}`);
setTimeout(() => {
setShowAlert(false);
}, 3000);
setShowAlert(true);
};

return (
<div className={styles.emoji__card} title={description} onClick={copy}>
<h1>{Object.values(emojis).filter((e) => e !== "-")[1]}</h1>
</div>
);
};

export default EmojiCard;
25 changes: 25 additions & 0 deletions components/Footer/Footer.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.footer {
position: sticky;
bottom: 0;
display: flex;
border-top: 1px solid lightgray;
color: gray;
user-select: none;
justify-content: space-between;
background-color: #f5f5f5;
padding: 10px 30px !important;
}
.footer > p {
margin: 0;
padding: 0 !important;
font-size: 0.9rem !important;
user-select: none !important;
display: flex;
align-items: center;
}

.footer__icon {
margin-left: 10px;
font-size: 2rem !important;
cursor: pointer;
}
27 changes: 27 additions & 0 deletions components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import Link from "next/link";
import React from "react";
import styles from "./Footer.module.css";
import { AiFillGithub } from "react-icons/ai";
import { DiNpm } from "react-icons/di";
interface Props {}
const Footer: React.FC<Props> = ({}) => {
return (
<div className={styles.footer}>
<p></p>
<p>
Copyright © {new Date().getFullYear()} React Emojify. All rights
reserved.
</p>
<p>
<Link href={""}>
<DiNpm className={styles.footer__icon} />
</Link>
<Link href={"https://github.com/CrispenGari/react-emojify"}>
<AiFillGithub className={styles.footer__icon} />
</Link>
</p>
</div>
);
};

export default Footer;
13 changes: 13 additions & 0 deletions components/Head/Head.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Head from "next/head";

const H = () => (
<Head>
<meta charSet="UTF-8" />
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>React Emojify</title>
<link rel="shortcut icon" href="/fav-ico.png" type="image/x-icon" />
</Head>
);

export default H;
15 changes: 15 additions & 0 deletions components/Layout/Layout.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.layout {
width: 100vw;
height: 100vh;
display: flex;
overflow-y: hidden;
overflow-x: hidden;
flex-direction: column;
}
.layout__main {
display: flex;
flex-direction: column;
flex: 1;
overflow-y: hidden;
overflow-x: hidden;
}
18 changes: 18 additions & 0 deletions components/Layout/Layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from "react";
import { Head, Footer } from "../";
import styles from "./Layout.module.css";
interface Props {
children: React.ReactNode;
}
const Layout: React.FC<Props> = ({ children }) => {
return (
<>
<Head />
<div className={styles.layout}>
<div className={styles.layout__main}>{children}</div>
<Footer />
</div>
</>
);
};
export default Layout;
18 changes: 18 additions & 0 deletions components/SearchBar/SearchBar.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.search__bar {
width: 100%;
margin: 10px auto;
border: 1px solid var(--main-color);
max-width: 500px;
padding: 3px 10px;
border-radius: 999px;
display: flex;
justify-content: space-between;
background-color: white;
}
.search__bar > input {
outline: none;
border: none;
padding: 4px 10px;
flex: 1;
font-size: 1.2rem;
}
21 changes: 21 additions & 0 deletions components/SearchBar/SearchBar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from "react";
import styles from "./SearchBar.module.css";
interface Props {
value?: string | number | readonly string[];
onChange?: React.ChangeEventHandler<HTMLInputElement>;
onSubmit?: React.FormEventHandler<HTMLFormElement>;
}
const SearchBar: React.FC<Props> = ({ onChange, value, onSubmit }) => {
return (
<form className={styles.search__bar} onSubmit={onSubmit}>
<input
type="text"
placeholder="Search Emoji"
value={value}
onChange={onChange}
/>
</form>
);
};

export default SearchBar;
5 changes: 5 additions & 0 deletions components/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export { default as Head } from "./Head/Head";
export { default as Layout } from "./Layout/Layout";
export { default as SearchBar } from "./SearchBar/SearchBar";
export { default as EmojiCard } from "./EmojiCard/EmojiCard";
export { default as Footer } from "./Footer/Footer";
Loading

1 comment on commit 260c9df

@vercel
Copy link

@vercel vercel bot commented on 260c9df Oct 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.