Skip to content

Commit

Permalink
Format docs and refactor readme files
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-dharti-r committed Jan 11, 2024
1 parent f29fb47 commit f6f8ccd
Show file tree
Hide file tree
Showing 28 changed files with 55 additions and 328 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,3 @@ jobs:
cd react
npm ci
npm run lint
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,28 +97,28 @@ We are providing some examples with design. so, you can easily take it and use i
### Canvas View

vue - [view code](./vue/examples/CanvasView.vue) <br>
react - [view code](./react/examples/CanvasView.vue)
react - [view code](./react/examples/CanvasView.tsx)

<img src="./gifs/canvas-view.gif"/>

### Square View

vue- [view code](./vue/examples/SquareView.vue) <br>
react - [view code](./react/examples/SquareView.vue)
react - [view code](./react/examples/SquareView.tsx)

<img src="./gifs/square-view.gif"/>

### Horizontal Long Square View

vue - [view code](./vue/examples/LongSquareView.vue) <br>
react - [view code](./react/examples/LongSquareView.vue)
react - [view code](./react/examples/LongSquareView.tsx)

<img src="./gifs/long-square-view.gif"/>

### Circular View

vue - [view code](./vue/examples/RoundView.vue) <br>
react - [view code](./react/examples/RoundView.vue)
react - [view code](./react/examples/RoundView.tsx)

<img src="./gifs/round-view.gif"/>

Expand Down
6 changes: 3 additions & 3 deletions react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const {
MultipleFileUpload,
} = require("@canopassoftware/react-file-upload");

OR
OR;

// using esModules
import {
Expand All @@ -131,7 +131,7 @@ import {
- Use `style.css` for UI by importing like,

```js
import "@canopassoftware/react-file-upload/style.css"
import "@canopassoftware/react-file-upload/style.css";
```

### Creating custom UI with file preview
Expand Down Expand Up @@ -246,4 +246,4 @@ return (
</main>
);
}
```
```
2 changes: 1 addition & 1 deletion react/examples/CanvasView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import Image, { StaticImageData } from "next/image";
import React, { useState } from "react";
import "@canopassoftware/react-file-upload/style.css"
import "@canopassoftware/react-file-upload/style.css";
import {
SingleFileUpload,
MultipleFileUpload,
Expand Down
2 changes: 1 addition & 1 deletion react/examples/LongSquareView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import Image, { StaticImageData } from "next/image";
import React, { useState } from "react";
import placeHolderImg from "../../assets/images/placeholder.png";
import "@canopassoftware/react-file-upload/style.css"
import "@canopassoftware/react-file-upload/style.css";
import {
SingleFileUpload,
MultipleFileUpload,
Expand Down
2 changes: 1 addition & 1 deletion react/examples/RoundView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import Image, { StaticImageData } from "next/image";
import React, { useState } from "react";
import placeHolderImg from "../../assets/images/placeholder.png";
import "@canopassoftware/react-file-upload/style.css"
import "@canopassoftware/react-file-upload/style.css";
import {
SingleFileUpload,
MultipleFileUpload,
Expand Down
2 changes: 1 addition & 1 deletion react/examples/SquareView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import Image, { StaticImageData } from "next/image";
import React, { useState } from "react";
import placeHolderImg from "../../assets/images/placeholder.png";
import "@canopassoftware/react-file-upload/style.css"
import "@canopassoftware/react-file-upload/style.css";
import {
SingleFileUpload,
MultipleFileUpload,
Expand Down
2 changes: 1 addition & 1 deletion react/examples/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
"tailwindcss": "^3.3.0",
"typescript": "^5"
}
}
}
18 changes: 9 additions & 9 deletions react/examples/demo/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import './globals.css'
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";

const inter = Inter({ subsets: ['latin'] })
const inter = Inter({ subsets: ["latin"] });

export const metadata: Metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
}
title: "Create Next App",
description: "Generated by create next app",
};

export default function RootLayout({
children,
}: {
children: React.ReactNode
children: React.ReactNode;
}) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
</html>
)
);
}
2 changes: 1 addition & 1 deletion react/examples/demo/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import Image, { StaticImageData } from "next/image";
import React, { useState } from "react";
import "@canopassoftware/react-file-upload/style.css"
import "@canopassoftware/react-file-upload/style.css";
import {
SingleFileUpload,
MultipleFileUpload,
Expand Down
18 changes: 9 additions & 9 deletions react/examples/demo/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import type { Config } from 'tailwindcss'
import type { Config } from "tailwindcss";

const config: Config = {
content: [
'./src/pages/**/*.{js,ts,jsx,tsx,mdx}',
'./src/components/**/*.{js,ts,jsx,tsx,mdx}',
'./src/app/**/*.{js,ts,jsx,tsx,mdx}',
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
],
theme: {
extend: {
backgroundImage: {
'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',
'gradient-conic':
'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))',
"gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
"gradient-conic":
"conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
},
},
},
plugins: [],
}
export default config
};
export default config;
2 changes: 1 addition & 1 deletion react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@
"./index.umd.js",
"./style.css"
]
}
}
18 changes: 9 additions & 9 deletions react/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import type { Config } from 'tailwindcss'
import type { Config } from "tailwindcss";

const config: Config = {
content: [
'./src/pages/**/*.{js,ts,jsx,tsx,mdx}',
'./src/components/**/*.{js,ts,jsx,tsx,mdx}',
'./src/app/**/*.{js,ts,jsx,tsx,mdx}',
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
],
theme: {
extend: {
backgroundImage: {
'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',
'gradient-conic':
'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))',
"gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
"gradient-conic":
"conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
},
},
},
plugins: [],
}
export default config
};
export default config;
14 changes: 3 additions & 11 deletions react/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
"compilerOptions": {
"outDir": "./dist",
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
Expand All @@ -25,9 +21,7 @@
}
],
"paths": {
"@/*": [
"./src/*"
]
"@/*": ["./src/*"]
}
},
"include": [
Expand All @@ -39,7 +33,5 @@
"./src",
".next/types/**/*.ts"
],
"exclude": [
"node_modules"
]
"exclude": ["node_modules"]
}
6 changes: 3 additions & 3 deletions vue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,19 @@ To manage and preview files with this library, follow these steps:

```js
// using CommonJS
const { SingleFileUpload, MultipleFileUpload } = require('@canopassoftware/vue-file-upload')
const { SingleFileUpload, MultipleFileUpload } = require('@canopassoftware/vue-file-upload');

OR
// using esModules
import { SingleFileUpload, MultipleFileUpload } from '@canopassoftware/vue-file-upload'
import { SingleFileUpload, MultipleFileUpload } from '@canopassoftware/vue-file-upload';
```

### Use default CSS

- Use `style.css` for UI by importing like,

```js
import "@canopassoftware/vue-file-upload/style.css"
import '@canopassoftware/vue-file-upload/style.css';
```

### Creating custom UI with file preview
Expand Down
2 changes: 1 addition & 1 deletion vue/examples/CanvasView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
</template>

<script lang="ts">
import "@canopassoftware/vue-file-upload/style.css"
import '@canopassoftware/vue-file-upload/style.css'
import { SingleFileUpload, MultipleFileUpload } from '@canopassoftware/vue-file-upload'
export default {
Expand Down
4 changes: 2 additions & 2 deletions vue/examples/LongSquareView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@
</template>

<script lang="ts">
import "@canopassoftware/vue-file-upload/style.css"
import '@canopassoftware/vue-file-upload/style.css'
import { SingleFileUpload, MultipleFileUpload } from '@canopassoftware/vue-file-upload'
import placeHolderImage from "../../assets/images/placeholder.png"
import placeHolderImage from '../../assets/images/placeholder.png'
export default {
components: {
Expand Down
4 changes: 2 additions & 2 deletions vue/examples/RoundView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@
</template>

<script lang="ts">
import "@canopassoftware/vue-file-upload/style.css"
import '@canopassoftware/vue-file-upload/style.css'
import { SingleFileUpload, MultipleFileUpload } from '@canopassoftware/vue-file-upload'
import placeHolderImage from "../../assets/images/placeholder.png"
import placeHolderImage from '../../assets/images/placeholder.png'
export default {
components: {
Expand Down
4 changes: 2 additions & 2 deletions vue/examples/SquareView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@
</template>

<script lang="ts">
import "@canopassoftware/vue-file-upload/style.css"
import '@canopassoftware/vue-file-upload/style.css'
import { SingleFileUpload, MultipleFileUpload } from '@canopassoftware/vue-file-upload'
import placeHolderImage from "../../assets/images/placeholder.png"
import placeHolderImage from '../../assets/images/placeholder.png'
export default {
components: {
Expand Down
41 changes: 0 additions & 41 deletions vue/examples/demo/src/components/HelloWorld.vue

This file was deleted.

Loading

0 comments on commit f6f8ccd

Please sign in to comment.