Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qr generator #888

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions 01-qrcode-gen/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
settings: { react: { version: '18.2' } },
plugins: ['react-refresh'],
rules: {
'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
24 changes: 24 additions & 0 deletions 01-qrcode-gen/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
69 changes: 69 additions & 0 deletions 01-qrcode-gen/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# QR Code Generator

<a href = "https://qr-generator-webcode.netlify.app/" >For live link Click here</a>

This project is a QR Code Generator built using React. It allows users to input text, select the background colour, and adjust the dimensions to generate a QR code. The generated QR code can be downloaded as well.

## Features

- Input text to generate a QR code
- Select background colour for the QR code
- Adjust dimensions of the QR code
- Download the generated QR code

## Technologies Used

- React
- Tailwind CSS

## Installation

1. Clone the repository:

```bash
- git clone https://github.com/arun-webcode/Reactjs-mini-projects/edit/main/01-qrcode-gen
- cd qr-code-generator
- npm install
- npm run dev
Note - Remember to add this code on tailwind.config.js file.
/** @type {import('tailwindcss').Config} */
export default {
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
darkMode: "class",
theme: {
extend: {},
},
plugins: [],
};
```

## Usage

1. Open the application in your browser.
2. Enter the text you want to encode in the QR code.
3. Select the background colour using the colour picker.
4. Adjust the dimensions using the range input.
5. Click on the "Generate" button to create the QR code.
6. Download the generated QR code by clicking the "Download" button.

##Project Structure
src/
├── components/
│ ├── Header.jsx
│ ├── InputBox.jsx
│ ├── ExtraOptions.jsx
├── App.jsx
├── index.css
├── main.jsx
└── index.html

<img src ="src\assets\qr-gen.jpg" />

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

Made By - @Arun-webcode
16 changes: 16 additions & 0 deletions 01-qrcode-gen/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!doctype html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>QrcodeGen</title>
</head>

<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>

</html>
Loading