A react tag input field component using shadcn, like one you see when adding keywords to a video on YouTube. Usable with Form
or standalone.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useMediaQuery } from 'usehooks-ts' | |
import { useMemo } from 'react'; | |
import { screens } from '.generated/screens'; | |
/* | |
// You can also define the screens object manually if you don't want to use a prebuilt script. | |
const screens = { | |
sm: '640px', | |
md: '768px', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Test, TestingModule } from '@nestjs/testing'; | |
import { PrismaService } from '../prisma.service'; | |
import { JobService } from './job.service'; | |
import * as crypto from 'crypto'; | |
describe('JobService', () => { | |
let service: JobService; | |
let prisma: PrismaService; | |
beforeEach(async () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Sets up a DOM MutationObserver that watches for elements using undefined CSS | |
* class names. Performance should be pretty good, but it's probably best to | |
* avoid using this in production. | |
* | |
* Usage: | |
* | |
* import cssCheck from './checkForUndefinedCSSClasses.js' | |
* | |
* // Call before DOM renders (e.g. in <HEAD> or prior to React.render()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1 align="center"> | |
<br> | |
<img src="YOUR_LOGO_URL" alt="YOUR_PROJECT_NAME" width="120"> | |
<br> | |
<br> | |
YOUR_PROJECT_NAME | |
</h1> | |
<p align="center">A little description about your project</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1 align="center"> | |
<br> | |
<img src="YOUR_LOGO_URL" alt="YOUR_PROJECT_NAME" width="120"> | |
<br> | |
<br> | |
YOUR_PROJECT_NAME | |
</h1> | |
<p align="center">A little description about your project</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useRef } from 'react'; | |
const safeDocument = typeof document !== 'undefined' ? document : {}; | |
/** | |
* Usage: | |
* const [blockScroll, allowScroll] = useScrollBlock(); | |
*/ | |
export default () => { | |
const scrollBlocked = useRef(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Simple is object check. | |
* @param item | |
* @returns {boolean} | |
*/ | |
function isObject(item) { | |
return (item && typeof item === 'object' && !Array.isArray(item)); | |
} | |
/** |
NewerOlder