Skip to content

Instantly share code, notes, and snippets.

View ndpniraj's full-sized avatar
😀
Always Happy

Niraj Dhungana ndpniraj

😀
Always Happy
View GitHub Profile
import { FC } from "react";
import { View, StyleSheet } from "react-native";
interface Props<T> {
data: T[];
renderItem(item: T): JSX.Element;
col?: number;
}
const GridView = <T extends any>(props: Props<T>) => {
import {
Box,
BoxShadow,
Canvas,
Fill,
Image,
ImageFormat,
Mask,
rect,
rrect,
import { NextApiHandler, NextApiRequest } from "next";
import formidable from "formidable";
import path from "path";
import fs from "fs/promises";
export const config = {
api: {
bodyParser: false,
},
};
@ndpniraj
ndpniraj / App.tsx
Created October 6, 2022 13:43
Tooltip Component Using React & Tailwind CSS
import { FC } from "react";
import { BsTypeBold } from "react-icons/bs";
import ToolTip from "./ToolTip";
interface Props {}
const App: FC<Props> = (props): JSX.Element => {
return (
<div className="mx-auto max-w-3xl p-10">
<ToolTip tooltip="I am tooltip">
@ndpniraj
ndpniraj / App.jsx
Created May 17, 2022 04:18
Custom Modal Youtube
import React from "react";
export default function App() {
return (
<div className="bg-blue-400 bg-opacity-30">
<div className="max-w-3xl mx-auto">
<div className="text-center py-3">
<button className="bg-red-400 text-white px-3 py-2 rounded hover:scale-95 transition text-xl">
Open Modal
</button>
import React from 'react';
import {ImageBackground, ScrollView, View} from 'react-native';
import CommentInput from './components/CommentInput';
export default function App() {
return (
<>
<ImageBackground
style={{flex: 1, opacity: 0.2}}
source={{