",
7 | "dependencies": {
8 | "@tailwindcss/typography": "^0.2.0",
9 | "@types/node": "^14.0.27",
10 | "@types/prismjs": "^1.16.1",
11 | "@types/react": "^16.9.46",
12 | "@types/react-dom": "^16.9.8",
13 | "@types/react-frame-component": "^4.1.1",
14 | "@types/react-tabs": "^2.3.2",
15 | "@typescript-eslint/eslint-plugin": "^3.9.0",
16 | "@typescript-eslint/parser": "^3.9.0",
17 | "framer-motion": "^2.4.2",
18 | "gatsby": "^2.24.37",
19 | "gatsby-image": "^2.4.14",
20 | "gatsby-plugin-breadcrumb": "^10.0.0",
21 | "gatsby-plugin-manifest": "^2.4.22",
22 | "gatsby-plugin-postcss": "^2.3.11",
23 | "gatsby-plugin-purgecss": "^5.0.0",
24 | "gatsby-plugin-react-helmet": "^3.3.10",
25 | "gatsby-plugin-react-svg": "^3.0.0",
26 | "gatsby-plugin-sharp": "^2.6.25",
27 | "gatsby-plugin-typescript": "^2.4.18",
28 | "gatsby-source-filesystem": "^2.3.24",
29 | "gatsby-transformer-json": "^2.4.11",
30 | "gatsby-transformer-sharp": "^2.5.12",
31 | "prism-react-renderer": "^1.1.1",
32 | "prismjs": "^1.21.0",
33 | "prop-types": "^15.7.2",
34 | "re-resizable": "^6.5.4",
35 | "react": "^16.12.0",
36 | "react-dom": "^16.12.0",
37 | "react-frame-component": "^4.1.3",
38 | "react-helmet": "^6.1.0",
39 | "react-intersection-observer": "^8.26.2",
40 | "react-live": "^2.2.2",
41 | "react-tabs": "^3.1.1",
42 | "typescript": "^3.9.7",
43 | "use-clipboard-copy": "^0.1.2",
44 | "uuid": "^8.3.0"
45 | },
46 | "devDependencies": {
47 | "prettier": "2.0.5",
48 | "tailwindcss": "^1.6.2"
49 | },
50 | "keywords": [
51 | "gatsby"
52 | ],
53 | "license": "0BSD",
54 | "scripts": {
55 | "build": "gatsby build",
56 | "develop": "gatsby develop",
57 | "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"",
58 | "start": "npm run develop",
59 | "serve": "gatsby serve",
60 | "clean": "gatsby clean",
61 | "test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\" && exit 1"
62 | },
63 | "repository": {
64 | "type": "git",
65 | "url": "https://github.com/gatsbyjs/gatsby-starter-default"
66 | },
67 | "bugs": {
68 | "url": "https://github.com/gatsbyjs/gatsby/issues"
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = () => ({
2 | plugins: [require("tailwindcss")],
3 | })
4 |
--------------------------------------------------------------------------------
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/m-abdelwahab/tailwind-snippets/8530d10283af4d5529cc3dac3b814d6412bf9a27/screenshot.png
--------------------------------------------------------------------------------
/src/components/Card.tsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import { Link } from "gatsby"
3 | import { motion } from "framer-motion"
4 | import Img from "gatsby-image"
5 |
6 | interface CardProps {
7 | link: string
8 | title: string
9 | image: any
10 | alt: string
11 | numOfComponents?: number
12 | }
13 | const Card = ({ link, title, image, numOfComponents, alt }: CardProps) => {
14 | return (
15 |
16 |
20 |
26 |
27 |
{title}
28 | {numOfComponents && (
29 | {numOfComponents} variations
30 | )}
31 |
32 |
33 |
34 | )
35 | }
36 |
37 | export default Card
38 |
--------------------------------------------------------------------------------
/src/components/CopyButton.tsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import { useClipboard } from "use-clipboard-copy"
3 |
4 | interface CopyButtonProps {
5 | text: string
6 | }
7 | const CopyButton = ({ text }: CopyButtonProps) => {
8 | const clipboard = useClipboard({
9 | copiedTimeout: 600, // timeout duration in ms
10 | })
11 | return (
12 | clipboard.copy(text)}
14 | className="mb-1 bg-blue-500 text-white rounded py-2 px-6 ml-5"
15 | >
16 | {clipboard.copied ? (
17 | copied!
18 | ) : (
19 |
27 |
28 |
29 |
30 | )}
31 |
32 | )
33 | }
34 |
35 | export default CopyButton
36 |
--------------------------------------------------------------------------------
/src/components/Featured.tsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect } from "react"
2 | import Card from "./Card"
3 | import { motion, useAnimation } from "framer-motion"
4 | import { useInView } from "react-intersection-observer"
5 | import { Link } from "gatsby"
6 | import { v4 as uuidv4 } from "uuid"
7 |
8 | interface FeaturedProps {
9 | title: string
10 | data: any
11 | link: string
12 | }
13 | const Featured = ({ title, data, link }: FeaturedProps) => {
14 | const animation = useAnimation()
15 |
16 | const [ref, inView] = useInView({
17 | triggerOnce: true,
18 | rootMargin: "50px 0px",
19 | })
20 | // Awesome answer https://stackoverflow.com/questions/59953580/framer-check-if-element-is-into-viewport
21 | useEffect(() => {
22 | if (inView) {
23 | animation.start("visible")
24 | } else {
25 | animation.start("hidden")
26 | }
27 | }, [animation, inView])
28 |
29 | const container = {
30 | hidden: { opacity: 1, scale: 0 },
31 | visible: {
32 | opacity: 1,
33 | scale: 1,
34 | transition: {
35 | when: "beforeChildren",
36 | staggerChildren: 0.2,
37 | },
38 | },
39 | }
40 |
41 | const item = {
42 | hidden: { y: 20, opacity: 0 },
43 | visible: {
44 | y: 0,
45 | opacity: 1,
46 | },
47 | }
48 |
49 | return (
50 |
51 |
52 |
53 |
54 | {title}
55 |
56 |
60 | View All
61 |
62 |
63 |
64 |
71 | {data.map(card => {
72 | return (
73 |
78 |
85 |
86 | )
87 | })}
88 |
89 |
90 |
91 | )
92 | }
93 |
94 | export default Featured
95 |
--------------------------------------------------------------------------------
/src/components/Hero.tsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import { TwoColGridComponent, code } from "../pages/layouts/two-column-grid"
3 | import { WithComponentPreview } from "../components"
4 | import { motion } from "framer-motion"
5 | const variants = {
6 | hidden: { opacity: 0 },
7 | visible: { opacity: 1 },
8 | }
9 | const Hero = () => {
10 | return (
11 |
12 |
13 |
23 | Stop writing the same CSS over and over again
24 |
25 |
35 | Common Layout and component snippets you can use to speed up your
36 | workflow
37 |
38 | {/* add product hunt badge */}
39 |
40 |
41 |
51 |
55 |
56 | Preview components
57 |
58 | at different screen
59 |
60 | sizes By dragging
61 |
62 |
69 |
70 |
74 |
75 |
76 |
80 |
84 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
98 |
Get the code
99 |
107 |
111 |
115 |
119 |
120 |
121 |
122 |
123 |
124 | )
125 | }
126 |
127 | export default Hero
128 |
--------------------------------------------------------------------------------
/src/components/WithComponentPreview.tsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import { LiveProvider, LiveEditor } from "react-live"
3 | import theme from "prism-react-renderer/themes/nightOwl"
4 | import { Resizable } from "re-resizable"
5 | import { Tab, Tabs, TabList, TabPanel } from "react-tabs"
6 | import Frame from "react-frame-component"
7 | import { CopyButton } from "./index"
8 |
9 | interface WithComponentPreviewProps {
10 | Code: string
11 | Component: React.ReactNode
12 | }
13 |
14 | const WithComponentPreview = ({
15 | Code,
16 | Component,
17 | }: WithComponentPreviewProps) => {
18 | return (
19 |
20 |
21 |
22 |
23 |
24 | Preview
25 | Code
26 |
27 |
28 |
29 |
30 |
56 |
63 | }
64 | >
65 |
66 |
67 |
68 |
69 |
70 |
75 |
76 |
77 |
78 |
79 | )
80 | }
81 |
82 | export default WithComponentPreview
83 |
--------------------------------------------------------------------------------
/src/components/index.ts:
--------------------------------------------------------------------------------
1 | import CopyButton from "./CopyButton"
2 | import WithComponentPreview from "./WithComponentPreview"
3 | import SEO from "./seo"
4 | import Hero from "./Hero"
5 | import Featured from "./Featured"
6 |
7 | export {
8 | CopyButton,
9 | WithComponentPreview,
10 | SEO,
11 | Hero,
12 | Featured,
13 | }
14 |
--------------------------------------------------------------------------------
/src/components/layout/Footer.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | const Footer = () => {
4 | return (
5 |
22 | );
23 | };
24 |
25 | export default Footer;
26 |
--------------------------------------------------------------------------------
/src/components/layout/GitHubRibbon.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 |
3 | const GitHubRibbon = () => {
4 | return (
5 |
10 |
24 |
25 |
31 |
36 |
37 |
38 | );
39 | };
40 |
41 | export default GitHubRibbon;
42 |
43 |
--------------------------------------------------------------------------------
/src/components/layout/Layout.tsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import { Footer, Navbar, GitHubRibbon, TailwindUIBanner } from "./index"
3 | import { motion } from "framer-motion"
4 |
5 | const duration = 0.6
6 |
7 | const variants = {
8 | initial: {
9 | opacity: 0,
10 | },
11 | enter: {
12 | opacity: 1,
13 | transition: {
14 | duration: duration,
15 | when: "beforeChildren",
16 | },
17 | },
18 | exit: {
19 | opacity: 0,
20 | transition: { duration: duration },
21 | },
22 | }
23 | interface LayoutProps {
24 | children: React.ReactNode
25 | location: any
26 | }
27 | const Layout = ({ children, location }: LayoutProps) => {
28 | return (
29 |
30 |
31 |
32 |
39 | {children}
40 |
41 |
42 |
43 |
44 | )
45 | }
46 |
47 | export default Layout
48 |
--------------------------------------------------------------------------------
/src/components/layout/Navbar.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Link } from "gatsby"
3 |
4 | const Navbar = () => {
5 | return (
6 |
7 |
8 |
9 |
10 |
14 | Tailwind Snippets
15 |
16 |
17 | Build UI faster
18 |
19 |
20 |
21 |
22 |
26 | Layouts
27 |
28 |
32 | Components
33 |
34 |
38 | About
39 |
40 |
41 |
42 | );
43 | };
44 |
45 | export default Navbar;
46 |
--------------------------------------------------------------------------------
/src/components/layout/TailwindUIBanner.tsx:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from "react";
2 | import Logo from "../../images/tailwind-ui-logo.svg";
3 |
4 | const TailwindUIBanner = () => {
5 | const initialState = () =>
6 | Boolean(typeof window !== 'undefined'? window.localStorage.getItem("hideBanner") : null);
7 | const [isHidden, setIsHidden] = useState(initialState);
8 | useEffect(() => {
9 | localStorage.setItem("hideBanner", JSON.stringify(isHidden));
10 | }, [isHidden]);
11 |
12 | const handleClick = () => setIsHidden(true);
13 |
14 | return !isHidden ? (
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | Tailwind UI is now in early
23 | access!
24 |
25 |
26 |
27 | Now in early access!
28 |
29 |
30 | Beautiful UI components by the creators of Tailwind CSS.
31 |
32 |
33 | Beautiful UI components, crafted by the creators of Tailwind
34 | CSS.
35 |
36 |
37 |
38 |
39 |
49 |
50 |
handleClick()}
52 | type="button"
53 | className="-mr-1 flex p-2 rounded-md hover:bg-gray-800 focus:outline-none focus:bg-gray-800"
54 | >
55 |
61 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | ) : null;
74 | };
75 |
76 | export default TailwindUIBanner;
77 |
--------------------------------------------------------------------------------
/src/components/layout/index.ts:
--------------------------------------------------------------------------------
1 | import Footer from "./Footer";
2 | import Navbar from "./Navbar";
3 | import Layout from "./Layout";
4 | import GitHubRibbon from "./GitHubRibbon";
5 | import TailwindUIBanner from "./TailwindUIBanner";
6 |
7 | export { Footer, Layout, Navbar, GitHubRibbon, TailwindUIBanner };
8 |
--------------------------------------------------------------------------------
/src/components/seo.tsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import PropTypes from "prop-types"
3 | import { Helmet } from "react-helmet"
4 | import { useStaticQuery, graphql } from "gatsby"
5 |
6 | function SEO({ description, lang, meta, title }) {
7 | const { site } = useStaticQuery(
8 | graphql`
9 | query {
10 | site {
11 | siteMetadata {
12 | title
13 | description
14 | author
15 | }
16 | }
17 | }
18 | `
19 | )
20 |
21 | const metaDescription = description || site.siteMetadata.description
22 |
23 | return (
24 |
65 | )
66 | }
67 |
68 | SEO.defaultProps = {
69 | lang: `en`,
70 | meta: [],
71 | description: ``,
72 | }
73 |
74 | SEO.propTypes = {
75 | description: PropTypes.string,
76 | lang: PropTypes.string,
77 | meta: PropTypes.arrayOf(PropTypes.object),
78 | title: PropTypes.string.isRequired,
79 | }
80 |
81 | export default SEO
82 |
--------------------------------------------------------------------------------
/src/data/featured.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "layouts": [
4 | {
5 | "image": {
6 | "src": "../images/layouts/two-column-grid.png",
7 | "alt": "Two Column Grid Layout"
8 | },
9 | "title": "Two Column Grid",
10 | "link": "/layouts/two-column-grid",
11 | "numOfComponents": ""
12 | },
13 | {
14 | "image": {
15 | "src": "../images/layouts/features.png",
16 | "alt": "Features Section"
17 | },
18 | "title": "Features",
19 | "link": "/layouts/features",
20 | "numOfComponents": ""
21 | }
22 | ],
23 | "components": [
24 | {
25 | "image": {
26 | "src": "../images/components/button.png",
27 | "alt": "Button component"
28 | },
29 | "title": "Button",
30 | "link": "/components/button",
31 | "numOfComponents": ""
32 | },
33 | {
34 | "image": {
35 | "src": "../images/components/navbar.png",
36 | "alt": "Navbar component"
37 | },
38 | "title": "Navbar",
39 | "link": "/components/navbar",
40 | "numOfComponents": "3"
41 | },
42 | {
43 | "image": {
44 | "src": "../images/components/avatar.png",
45 | "alt": "Avatar component"
46 | },
47 | "title": "Avatar",
48 | "link": "/components/avatar",
49 | "numOfComponents": ""
50 | }
51 | ]
52 | }
53 | ]
54 |
--------------------------------------------------------------------------------
/src/images/components/avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/m-abdelwahab/tailwind-snippets/8530d10283af4d5529cc3dac3b814d6412bf9a27/src/images/components/avatar.png
--------------------------------------------------------------------------------
/src/images/components/button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/m-abdelwahab/tailwind-snippets/8530d10283af4d5529cc3dac3b814d6412bf9a27/src/images/components/button.png
--------------------------------------------------------------------------------
/src/images/components/gatsby-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/m-abdelwahab/tailwind-snippets/8530d10283af4d5529cc3dac3b814d6412bf9a27/src/images/components/gatsby-icon.png
--------------------------------------------------------------------------------
/src/images/components/navbar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/m-abdelwahab/tailwind-snippets/8530d10283af4d5529cc3dac3b814d6412bf9a27/src/images/components/navbar.png
--------------------------------------------------------------------------------
/src/images/gatsby-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/m-abdelwahab/tailwind-snippets/8530d10283af4d5529cc3dac3b814d6412bf9a27/src/images/gatsby-icon.png
--------------------------------------------------------------------------------
/src/images/layouts/features.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/m-abdelwahab/tailwind-snippets/8530d10283af4d5529cc3dac3b814d6412bf9a27/src/images/layouts/features.png
--------------------------------------------------------------------------------
/src/images/layouts/sections-heroes.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/src/images/layouts/two-column-grid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/m-abdelwahab/tailwind-snippets/8530d10283af4d5529cc3dac3b814d6412bf9a27/src/images/layouts/two-column-grid.png
--------------------------------------------------------------------------------
/src/images/sections-heroes.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/src/images/tailwind-ui-logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/images/tailwindcss.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/images/typescript.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/pages/404.tsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import SEO from "../components/seo"
3 |
4 | const NotFoundPage = () => (
5 | <>
6 |
7 | NOT FOUND
8 | You just hit a route that doesn't exist... the sadness.
9 | >
10 | )
11 |
12 | export default NotFoundPage
13 |
--------------------------------------------------------------------------------
/src/pages/about.tsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import SEO from "../components/seo"
3 |
4 | const About = () => {
5 | return (
6 | <>
7 |
8 |
9 |
10 | About This project
11 |
12 | The reason I created this project was because I really like using a
13 | utility-first CSS framework. It allowed me to be super productive and
14 | to be enjoy writing CSS.
15 |
16 |
17 | As a developer, I really love re-usability. I don't want to waste my
18 | time building the same design over and over again. I prefer to learn
19 | new things and allocate my time and energy to more complex tasks
20 |
21 |
22 | I'm pretty sure this project will be beneficial to all Front-end
23 | Developers who love using Tailwind. If this project saved you some
24 | time, consider donating
25 |
26 |
27 |
33 |
34 | 📖 Buy me a Book
35 |
36 |
37 |
38 | >
39 | )
40 | }
41 |
42 | export default About
43 |
--------------------------------------------------------------------------------
/src/pages/components/avatar.tsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import { WithComponentPreview } from "../../components"
3 |
4 | const Avatar = () => {
5 | return (
6 |
7 | )
8 | }
9 |
10 | const AvatarComponent = () => {
11 | return (
12 |
13 |
18 |
19 | )
20 | }
21 | const code = `
22 |
23 | `
24 |
25 | export default Avatar
26 |
--------------------------------------------------------------------------------
/src/pages/components/button.tsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import { WithComponentPreview } from "../../components"
3 | // import { Breadcrumb } from "gatsby-plugin-breadcrumb"
4 |
5 | const Button = ({ pageContext }) => {
6 | // const {
7 | // breadcrumb: { crumbs },
8 | // } = pageContext
9 | return (
10 |
11 | {/* */}
12 |
13 |
14 | )
15 | }
16 |
17 | const ButtonComponent = () => {
18 | return (
19 |
20 |
21 | Button
22 |
23 |
24 | )
25 | }
26 | const code = `
27 | Button
28 | `
29 |
30 | export default Button
31 |
--------------------------------------------------------------------------------
/src/pages/components/index.tsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | const Components = () => {
4 | return (
5 |
6 |
Hello from the components page!
7 |
8 | )
9 | }
10 |
11 | export default Components
12 |
--------------------------------------------------------------------------------
/src/pages/components/navbar.tsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | const Navbar = () => {
4 | return (
5 |
6 |
Coming Soon!
7 |
8 | )
9 | }
10 |
11 | export default Navbar
12 |
--------------------------------------------------------------------------------
/src/pages/index.tsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import { Hero, Featured } from "../components"
3 | import { graphql, useStaticQuery } from "gatsby"
4 |
5 | const IndexPage = () => {
6 | const featuredData = useStaticQuery(graphql`
7 | query {
8 | featuredJson {
9 | layouts {
10 | title
11 | link
12 | numOfComponents
13 | image {
14 | alt
15 | src {
16 | childImageSharp {
17 | fluid {
18 | ...GatsbyImageSharpFluid
19 | }
20 | }
21 | }
22 | }
23 | }
24 | components {
25 | title
26 | link
27 | numOfComponents
28 | image {
29 | alt
30 | src {
31 | childImageSharp {
32 | fluid {
33 | ...GatsbyImageSharpFluid
34 | }
35 | }
36 | }
37 | }
38 | }
39 | }
40 | }
41 | `)
42 | const { components, layouts } = featuredData.featuredJson
43 | console.log(components)
44 | return (
45 | <>
46 |
47 |
48 |
49 | >
50 | )
51 | }
52 |
53 | export default IndexPage
54 |
--------------------------------------------------------------------------------
/src/pages/layouts/features.tsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | const Features = () => {
4 | return (
5 |
6 |
Coming Soon!
7 |
8 | )
9 | }
10 |
11 | export default Features
12 |
--------------------------------------------------------------------------------
/src/pages/layouts/index.tsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 |
3 | const Layouts = () => {
4 | return (
5 | <>
6 |
7 |
Hello from the layouts page!
8 |
9 | >
10 | )
11 | }
12 |
13 | export default Layouts
14 |
--------------------------------------------------------------------------------
/src/pages/layouts/two-column-grid.tsx:
--------------------------------------------------------------------------------
1 | import React from "react"
2 | import { WithComponentPreview } from "../../components"
3 |
4 | const TwoColGrid = () => (
5 |
6 | )
7 |
8 | export default TwoColGrid
9 |
10 | export const TwoColGridComponent = () => {
11 | return (
12 |
29 | )
30 | }
31 |
32 | export const code = `
33 |
50 | `
51 |
--------------------------------------------------------------------------------
/src/styles/tailwind.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 |
3 | @tailwind components;
4 |
5 | @tailwind utilities;
6 |
7 | html {
8 | scroll-behavior: smooth;
9 | scroll-margin-top: 2rem;
10 | }
11 | .react-tabs {
12 | -webkit-tap-highlight-color: transparent;
13 | }
14 |
15 | .react-tabs__tab-list {
16 | margin: 0;
17 | padding: 0;
18 | }
19 |
20 | .react-tabs__tab {
21 | display: inline-block;
22 | border: 1px solid transparent;
23 | border-bottom: none;
24 | bottom: -1px;
25 | position: relative;
26 | list-style: none;
27 | padding: 6px 12px;
28 | cursor: pointer;
29 | }
30 |
31 | .react-tabs__tab--selected {
32 | background: #4299e1;
33 | color: white;
34 | margin-bottom: 5px;
35 | border-radius: 5px;
36 | }
37 |
38 | .react-tabs__tab--disabled {
39 | color: GrayText;
40 | cursor: default;
41 | }
42 |
43 | /* .react-tabs__tab:focus {
44 | box-shadow: 0 0 5px hsl(208, 99%, 50%);
45 | border-color: hsl(208, 99%, 50%);
46 | outline: none;
47 | }
48 |
49 | .react-tabs__tab:focus:after {
50 | content: "";
51 | position: absolute;
52 | height: 5px;
53 | left: -4px;
54 | right: -4px;
55 | bottom: -5px;
56 | background: #fff;
57 | } */
58 |
59 | .react-tabs__tab-panel {
60 | display: none;
61 | }
62 |
63 | .react-tabs__tab-panel--selected {
64 | display: block;
65 | }
66 |
67 | .github-corner:hover .octo-arm {
68 | animation: octocat-wave 560ms ease-in-out;
69 | }
70 | @keyframes octocat-wave {
71 | 0%,
72 | 100% {
73 | transform: rotate(0);
74 | }
75 | 20%,
76 | 60% {
77 | transform: rotate(-25deg);
78 | }
79 | 40%,
80 | 80% {
81 | transform: rotate(10deg);
82 | }
83 | }
84 | @media (max-width: 500px) {
85 | .github-corner:hover .octo-arm {
86 | animation: none;
87 | }
88 | .github-corner .octo-arm {
89 | animation: octocat-wave 560ms ease-in-out;
90 | }
91 | }
92 |
93 | .bmc-button img {
94 | height: 34px !important;
95 | width: 35px !important;
96 | margin-bottom: 1px !important;
97 | box-shadow: none !important;
98 | border: none !important;
99 | vertical-align: middle !important;
100 | }
101 | .bmc-button {
102 | padding: 7px 15px 7px 10px !important;
103 | line-height: 35px !important;
104 | height: 51px !important;
105 | text-decoration: none !important;
106 | display: inline-flex !important;
107 | color: #ffffff !important;
108 | background-color: #000000 !important;
109 | border-radius: 8px !important;
110 | border: 1px solid transparent !important;
111 | font-size: 24px !important;
112 | letter-spacing: 0.6px !important;
113 | box-shadow: 0px 1px 2px rgba(190, 190, 190, 0.5) !important;
114 | -webkit-box-shadow: 0px 1px 2px 2px rgba(190, 190, 190, 0.5) !important;
115 | margin: 0 auto !important;
116 | -webkit-box-sizing: border-box !important;
117 | box-sizing: border-box !important;
118 | }
119 | .bmc-button:hover,
120 | .bmc-button:active,
121 | .bmc-button:focus {
122 | -webkit-box-shadow: 0px 1px 2px 2px rgba(190, 190, 190, 0.5) !important;
123 | text-decoration: none !important;
124 | box-shadow: 0px 1px 2px 2px rgba(190, 190, 190, 0.5) !important;
125 | opacity: 0.85 !important;
126 | color: #ffffff !important;
127 | }
128 |
129 | .breadcrumb__title {
130 | color: white;
131 | font-size: 1.2rem;
132 | text-decoration: none;
133 | }
134 |
135 | nav.breadcrumb {
136 | font-size: 1.2rem;
137 | font-weight: 500;
138 | }
139 |
140 | nav .breadcrumb__list {
141 | display: flex;
142 | flex-wrap: wrap;
143 | list-style: none;
144 | margin: 5rem 0 0 13rem;
145 | padding-left: 0;
146 | }
147 |
148 | nav .breadcrumb__list__item {
149 | margin: 0 0.25em;
150 | }
151 |
152 | nav .breadcrumb__link {
153 | text-decoration: none;
154 | color: #696969;
155 | }
156 |
157 | nav .breadcrumb__link__active {
158 | text-decoration: none;
159 | color: black;
160 | }
161 |
162 | nav .breadcrumb__link__disabled {
163 | text-decoration: none;
164 | }
165 |
166 | nav .breadcrumb__separator {
167 | color: #696969;
168 | }
169 |
--------------------------------------------------------------------------------
/tailwind.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | purge: false,
3 | target: "relaxed",
4 | prefix: "",
5 | important: false,
6 | separator: ":",
7 | theme: {
8 | screens: {
9 | sm: "640px",
10 | md: "768px",
11 | lg: "1024px",
12 | xl: "1280px",
13 | },
14 | colors: {
15 | transparent: "transparent",
16 | current: "currentColor",
17 |
18 | black: "#000",
19 | white: "#fff",
20 |
21 | gray: {
22 | 100: "#f7fafc",
23 | 200: "#edf2f7",
24 | 300: "#e2e8f0",
25 | 400: "#cbd5e0",
26 | 500: "#a0aec0",
27 | 600: "#718096",
28 | 700: "#4a5568",
29 | 800: "#2d3748",
30 | 900: "#1a202c",
31 | },
32 | red: {
33 | 100: "#fff5f5",
34 | 200: "#fed7d7",
35 | 300: "#feb2b2",
36 | 400: "#fc8181",
37 | 500: "#f56565",
38 | 600: "#e53e3e",
39 | 700: "#c53030",
40 | 800: "#9b2c2c",
41 | 900: "#742a2a",
42 | },
43 | orange: {
44 | 100: "#fffaf0",
45 | 200: "#feebc8",
46 | 300: "#fbd38d",
47 | 400: "#f6ad55",
48 | 500: "#ed8936",
49 | 600: "#dd6b20",
50 | 700: "#c05621",
51 | 800: "#9c4221",
52 | 900: "#7b341e",
53 | },
54 | yellow: {
55 | 100: "#fffff0",
56 | 200: "#fefcbf",
57 | 300: "#faf089",
58 | 400: "#f6e05e",
59 | 500: "#ecc94b",
60 | 600: "#d69e2e",
61 | 700: "#b7791f",
62 | 800: "#975a16",
63 | 900: "#744210",
64 | },
65 | green: {
66 | 100: "#f0fff4",
67 | 200: "#c6f6d5",
68 | 300: "#9ae6b4",
69 | 400: "#68d391",
70 | 500: "#48bb78",
71 | 600: "#38a169",
72 | 700: "#2f855a",
73 | 800: "#276749",
74 | 900: "#22543d",
75 | },
76 | teal: {
77 | 100: "#e6fffa",
78 | 200: "#b2f5ea",
79 | 300: "#81e6d9",
80 | 400: "#4fd1c5",
81 | 500: "#38b2ac",
82 | 600: "#319795",
83 | 700: "#2c7a7b",
84 | 800: "#285e61",
85 | 900: "#234e52",
86 | },
87 | blue: {
88 | 100: "#ebf8ff",
89 | 200: "#bee3f8",
90 | 300: "#90cdf4",
91 | 400: "#63b3ed",
92 | 500: "#4299e1",
93 | 600: "#3182ce",
94 | 700: "#2b6cb0",
95 | 800: "#2c5282",
96 | 900: "#2a4365",
97 | },
98 | indigo: {
99 | 100: "#ebf4ff",
100 | 200: "#c3dafe",
101 | 300: "#a3bffa",
102 | 400: "#7f9cf5",
103 | 500: "#667eea",
104 | 600: "#5a67d8",
105 | 700: "#4c51bf",
106 | 800: "#434190",
107 | 900: "#3c366b",
108 | },
109 | purple: {
110 | 100: "#faf5ff",
111 | 200: "#e9d8fd",
112 | 300: "#d6bcfa",
113 | 400: "#b794f4",
114 | 500: "#9f7aea",
115 | 600: "#805ad5",
116 | 700: "#6b46c1",
117 | 800: "#553c9a",
118 | 900: "#44337a",
119 | },
120 | pink: {
121 | 100: "#fff5f7",
122 | 200: "#fed7e2",
123 | 300: "#fbb6ce",
124 | 400: "#f687b3",
125 | 500: "#ed64a6",
126 | 600: "#d53f8c",
127 | 700: "#b83280",
128 | 800: "#97266d",
129 | 900: "#702459",
130 | },
131 | },
132 | spacing: {
133 | px: "1px",
134 | "0": "0",
135 | "1": "0.25rem",
136 | "2": "0.5rem",
137 | "3": "0.75rem",
138 | "4": "1rem",
139 | "5": "1.25rem",
140 | "6": "1.5rem",
141 | "8": "2rem",
142 | "10": "2.5rem",
143 | "12": "3rem",
144 | "16": "4rem",
145 | "20": "5rem",
146 | "24": "6rem",
147 | "32": "8rem",
148 | "40": "10rem",
149 | "48": "12rem",
150 | "56": "14rem",
151 | "64": "16rem",
152 | },
153 | backgroundColor: theme => theme("colors"),
154 | backgroundOpacity: theme => theme("opacity"),
155 | backgroundPosition: {
156 | bottom: "bottom",
157 | center: "center",
158 | left: "left",
159 | "left-bottom": "left bottom",
160 | "left-top": "left top",
161 | right: "right",
162 | "right-bottom": "right bottom",
163 | "right-top": "right top",
164 | top: "top",
165 | },
166 | backgroundSize: {
167 | auto: "auto",
168 | cover: "cover",
169 | contain: "contain",
170 | },
171 | borderColor: theme => ({
172 | ...theme("colors"),
173 | default: theme("colors.gray.300", "currentColor"),
174 | }),
175 | borderOpacity: theme => theme("opacity"),
176 | borderRadius: {
177 | none: "0",
178 | sm: "0.125rem",
179 | default: "0.25rem",
180 | md: "0.375rem",
181 | lg: "0.5rem",
182 | full: "9999px",
183 | },
184 | borderWidth: {
185 | default: "1px",
186 | "0": "0",
187 | "2": "2px",
188 | "4": "4px",
189 | "8": "8px",
190 | },
191 | boxShadow: {
192 | xs: "0 0 0 1px rgba(0, 0, 0, 0.05)",
193 | sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
194 | default:
195 | "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",
196 | md:
197 | "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
198 | lg:
199 | "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
200 | xl:
201 | "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
202 | "2xl": "0 25px 50px -12px rgba(0, 0, 0, 0.25)",
203 | inner: "inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)",
204 | outline: "0 0 0 3px rgba(66, 153, 225, 0.5)",
205 | none: "none",
206 | },
207 | container: {},
208 | cursor: {
209 | auto: "auto",
210 | default: "default",
211 | pointer: "pointer",
212 | wait: "wait",
213 | text: "text",
214 | move: "move",
215 | "not-allowed": "not-allowed",
216 | },
217 | divideColor: theme => theme("borderColor"),
218 | divideOpacity: theme => theme("borderOpacity"),
219 | divideWidth: theme => theme("borderWidth"),
220 | fill: {
221 | current: "currentColor",
222 | },
223 | flex: {
224 | "1": "1 1 0%",
225 | auto: "1 1 auto",
226 | initial: "0 1 auto",
227 | none: "none",
228 | },
229 | flexGrow: {
230 | "0": "0",
231 | default: "1",
232 | },
233 | flexShrink: {
234 | "0": "0",
235 | default: "1",
236 | },
237 | fontFamily: {
238 | sans: [
239 | "system-ui",
240 | "-apple-system",
241 | "BlinkMacSystemFont",
242 | '"Segoe UI"',
243 | "Roboto",
244 | '"Helvetica Neue"',
245 | "Arial",
246 | '"Noto Sans"',
247 | "sans-serif",
248 | '"Apple Color Emoji"',
249 | '"Segoe UI Emoji"',
250 | '"Segoe UI Symbol"',
251 | '"Noto Color Emoji"',
252 | ],
253 | serif: ["Georgia", "Cambria", '"Times New Roman"', "Times", "serif"],
254 | mono: [
255 | "Menlo",
256 | "Monaco",
257 | "Consolas",
258 | '"Liberation Mono"',
259 | '"Courier New"',
260 | "monospace",
261 | ],
262 | },
263 | fontSize: {
264 | xs: "0.75rem",
265 | sm: "0.875rem",
266 | base: "1rem",
267 | lg: "1.125rem",
268 | xl: "1.25rem",
269 | "2xl": "1.5rem",
270 | "3xl": "1.875rem",
271 | "4xl": "2.25rem",
272 | "5xl": "3rem",
273 | "6xl": "4rem",
274 | },
275 | fontWeight: {
276 | hairline: "100",
277 | thin: "200",
278 | light: "300",
279 | normal: "400",
280 | medium: "500",
281 | semibold: "600",
282 | bold: "700",
283 | extrabold: "800",
284 | black: "900",
285 | },
286 | height: theme => ({
287 | auto: "auto",
288 | ...theme("spacing"),
289 | full: "100%",
290 | screen: "100vh",
291 | }),
292 | inset: {
293 | "0": "0",
294 | auto: "auto",
295 | },
296 | letterSpacing: {
297 | tighter: "-0.05em",
298 | tight: "-0.025em",
299 | normal: "0",
300 | wide: "0.025em",
301 | wider: "0.05em",
302 | widest: "0.1em",
303 | },
304 | lineHeight: {
305 | none: "1",
306 | tight: "1.25",
307 | snug: "1.375",
308 | normal: "1.5",
309 | relaxed: "1.625",
310 | loose: "2",
311 | "3": ".75rem",
312 | "4": "1rem",
313 | "5": "1.25rem",
314 | "6": "1.5rem",
315 | "7": "1.75rem",
316 | "8": "2rem",
317 | "9": "2.25rem",
318 | "10": "2.5rem",
319 | },
320 | listStyleType: {
321 | none: "none",
322 | disc: "disc",
323 | decimal: "decimal",
324 | },
325 | margin: (theme, { negative }) => ({
326 | auto: "auto",
327 | ...theme("spacing"),
328 | ...negative(theme("spacing")),
329 | }),
330 | maxHeight: {
331 | full: "100%",
332 | screen: "100vh",
333 | },
334 | maxWidth: (theme, { breakpoints }) => ({
335 | none: "none",
336 | xs: "20rem",
337 | sm: "24rem",
338 | md: "28rem",
339 | lg: "32rem",
340 | xl: "36rem",
341 | "2xl": "42rem",
342 | "3xl": "48rem",
343 | "4xl": "56rem",
344 | "5xl": "64rem",
345 | "6xl": "72rem",
346 | full: "100%",
347 | ...breakpoints(theme("screens")),
348 | }),
349 | minHeight: {
350 | "0": "0",
351 | full: "100%",
352 | screen: "100vh",
353 | },
354 | minWidth: {
355 | "0": "0",
356 | full: "100%",
357 | },
358 | objectPosition: {
359 | bottom: "bottom",
360 | center: "center",
361 | left: "left",
362 | "left-bottom": "left bottom",
363 | "left-top": "left top",
364 | right: "right",
365 | "right-bottom": "right bottom",
366 | "right-top": "right top",
367 | top: "top",
368 | },
369 | opacity: {
370 | "0": "0",
371 | "25": "0.25",
372 | "50": "0.5",
373 | "75": "0.75",
374 | "100": "1",
375 | },
376 | order: {
377 | first: "-9999",
378 | last: "9999",
379 | none: "0",
380 | "1": "1",
381 | "2": "2",
382 | "3": "3",
383 | "4": "4",
384 | "5": "5",
385 | "6": "6",
386 | "7": "7",
387 | "8": "8",
388 | "9": "9",
389 | "10": "10",
390 | "11": "11",
391 | "12": "12",
392 | },
393 | padding: theme => theme("spacing"),
394 | placeholderColor: theme => theme("colors"),
395 | placeholderOpacity: theme => theme("opacity"),
396 | space: (theme, { negative }) => ({
397 | ...theme("spacing"),
398 | ...negative(theme("spacing")),
399 | }),
400 | stroke: {
401 | current: "currentColor",
402 | },
403 | strokeWidth: {
404 | "0": "0",
405 | "1": "1",
406 | "2": "2",
407 | },
408 | textColor: theme => theme("colors"),
409 | textOpacity: theme => theme("opacity"),
410 | width: theme => ({
411 | auto: "auto",
412 | ...theme("spacing"),
413 | "1/2": "50%",
414 | "1/3": "33.333333%",
415 | "2/3": "66.666667%",
416 | "1/4": "25%",
417 | "2/4": "50%",
418 | "3/4": "75%",
419 | "1/5": "20%",
420 | "2/5": "40%",
421 | "3/5": "60%",
422 | "4/5": "80%",
423 | "1/6": "16.666667%",
424 | "2/6": "33.333333%",
425 | "3/6": "50%",
426 | "4/6": "66.666667%",
427 | "5/6": "83.333333%",
428 | "1/12": "8.333333%",
429 | "2/12": "16.666667%",
430 | "3/12": "25%",
431 | "4/12": "33.333333%",
432 | "5/12": "41.666667%",
433 | "6/12": "50%",
434 | "7/12": "58.333333%",
435 | "8/12": "66.666667%",
436 | "9/12": "75%",
437 | "10/12": "83.333333%",
438 | "11/12": "91.666667%",
439 | full: "100%",
440 | screen: "100vw",
441 | }),
442 | zIndex: {
443 | auto: "auto",
444 | "0": "0",
445 | "10": "10",
446 | "20": "20",
447 | "30": "30",
448 | "40": "40",
449 | "50": "50",
450 | },
451 | gap: theme => theme("spacing"),
452 | gridTemplateColumns: {
453 | none: "none",
454 | "1": "repeat(1, minmax(0, 1fr))",
455 | "2": "repeat(2, minmax(0, 1fr))",
456 | "3": "repeat(3, minmax(0, 1fr))",
457 | "4": "repeat(4, minmax(0, 1fr))",
458 | "5": "repeat(5, minmax(0, 1fr))",
459 | "6": "repeat(6, minmax(0, 1fr))",
460 | "7": "repeat(7, minmax(0, 1fr))",
461 | "8": "repeat(8, minmax(0, 1fr))",
462 | "9": "repeat(9, minmax(0, 1fr))",
463 | "10": "repeat(10, minmax(0, 1fr))",
464 | "11": "repeat(11, minmax(0, 1fr))",
465 | "12": "repeat(12, minmax(0, 1fr))",
466 | },
467 | gridColumn: {
468 | auto: "auto",
469 | "span-1": "span 1 / span 1",
470 | "span-2": "span 2 / span 2",
471 | "span-3": "span 3 / span 3",
472 | "span-4": "span 4 / span 4",
473 | "span-5": "span 5 / span 5",
474 | "span-6": "span 6 / span 6",
475 | "span-7": "span 7 / span 7",
476 | "span-8": "span 8 / span 8",
477 | "span-9": "span 9 / span 9",
478 | "span-10": "span 10 / span 10",
479 | "span-11": "span 11 / span 11",
480 | "span-12": "span 12 / span 12",
481 | },
482 | gridColumnStart: {
483 | auto: "auto",
484 | "1": "1",
485 | "2": "2",
486 | "3": "3",
487 | "4": "4",
488 | "5": "5",
489 | "6": "6",
490 | "7": "7",
491 | "8": "8",
492 | "9": "9",
493 | "10": "10",
494 | "11": "11",
495 | "12": "12",
496 | "13": "13",
497 | },
498 | gridColumnEnd: {
499 | auto: "auto",
500 | "1": "1",
501 | "2": "2",
502 | "3": "3",
503 | "4": "4",
504 | "5": "5",
505 | "6": "6",
506 | "7": "7",
507 | "8": "8",
508 | "9": "9",
509 | "10": "10",
510 | "11": "11",
511 | "12": "12",
512 | "13": "13",
513 | },
514 | gridTemplateRows: {
515 | none: "none",
516 | "1": "repeat(1, minmax(0, 1fr))",
517 | "2": "repeat(2, minmax(0, 1fr))",
518 | "3": "repeat(3, minmax(0, 1fr))",
519 | "4": "repeat(4, minmax(0, 1fr))",
520 | "5": "repeat(5, minmax(0, 1fr))",
521 | "6": "repeat(6, minmax(0, 1fr))",
522 | },
523 | gridRow: {
524 | auto: "auto",
525 | "span-1": "span 1 / span 1",
526 | "span-2": "span 2 / span 2",
527 | "span-3": "span 3 / span 3",
528 | "span-4": "span 4 / span 4",
529 | "span-5": "span 5 / span 5",
530 | "span-6": "span 6 / span 6",
531 | },
532 | gridRowStart: {
533 | auto: "auto",
534 | "1": "1",
535 | "2": "2",
536 | "3": "3",
537 | "4": "4",
538 | "5": "5",
539 | "6": "6",
540 | "7": "7",
541 | },
542 | gridRowEnd: {
543 | auto: "auto",
544 | "1": "1",
545 | "2": "2",
546 | "3": "3",
547 | "4": "4",
548 | "5": "5",
549 | "6": "6",
550 | "7": "7",
551 | },
552 | transformOrigin: {
553 | center: "center",
554 | top: "top",
555 | "top-right": "top right",
556 | right: "right",
557 | "bottom-right": "bottom right",
558 | bottom: "bottom",
559 | "bottom-left": "bottom left",
560 | left: "left",
561 | "top-left": "top left",
562 | },
563 | scale: {
564 | "0": "0",
565 | "50": ".5",
566 | "75": ".75",
567 | "90": ".9",
568 | "95": ".95",
569 | "100": "1",
570 | "105": "1.05",
571 | "110": "1.1",
572 | "125": "1.25",
573 | "150": "1.5",
574 | },
575 | rotate: {
576 | "-180": "-180deg",
577 | "-90": "-90deg",
578 | "-45": "-45deg",
579 | "0": "0",
580 | "45": "45deg",
581 | "90": "90deg",
582 | "180": "180deg",
583 | },
584 | translate: (theme, { negative }) => ({
585 | ...theme("spacing"),
586 | ...negative(theme("spacing")),
587 | "-full": "-100%",
588 | "-1/2": "-50%",
589 | "1/2": "50%",
590 | full: "100%",
591 | }),
592 | skew: {
593 | "-12": "-12deg",
594 | "-6": "-6deg",
595 | "-3": "-3deg",
596 | "0": "0",
597 | "3": "3deg",
598 | "6": "6deg",
599 | "12": "12deg",
600 | },
601 | transitionProperty: {
602 | none: "none",
603 | all: "all",
604 | default:
605 | "background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",
606 | colors: "background-color, border-color, color, fill, stroke",
607 | opacity: "opacity",
608 | shadow: "box-shadow",
609 | transform: "transform",
610 | },
611 | transitionTimingFunction: {
612 | linear: "linear",
613 | in: "cubic-bezier(0.4, 0, 1, 1)",
614 | out: "cubic-bezier(0, 0, 0.2, 1)",
615 | "in-out": "cubic-bezier(0.4, 0, 0.2, 1)",
616 | },
617 | transitionDuration: {
618 | "75": "75ms",
619 | "100": "100ms",
620 | "150": "150ms",
621 | "200": "200ms",
622 | "300": "300ms",
623 | "500": "500ms",
624 | "700": "700ms",
625 | "1000": "1000ms",
626 | },
627 | transitionDelay: {
628 | "75": "75ms",
629 | "100": "100ms",
630 | "150": "150ms",
631 | "200": "200ms",
632 | "300": "300ms",
633 | "500": "500ms",
634 | "700": "700ms",
635 | "1000": "1000ms",
636 | },
637 | animation: {
638 | none: "none",
639 | spin: "spin 1s linear infinite",
640 | ping: "ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",
641 | pulse: "pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
642 | bounce: "bounce 1s infinite",
643 | },
644 | keyframes: {
645 | spin: {
646 | from: { transform: "rotate(0deg)" },
647 | to: { transform: "rotate(360deg)" },
648 | },
649 | ping: {
650 | "0%": { transform: "scale(1)", opacity: "1" },
651 | "75%, 100%": { transform: "scale(2)", opacity: "0" },
652 | },
653 | pulse: {
654 | "0%, 100%": { opacity: "1" },
655 | "50%": { opacity: ".5" },
656 | },
657 | bounce: {
658 | "0%, 100%": {
659 | transform: "translateY(-25%)",
660 | animationTimingFunction: "cubic-bezier(0.8,0,1,1)",
661 | },
662 | "50%": {
663 | transform: "translateY(0)",
664 | animationTimingFunction: "cubic-bezier(0,0,0.2,1)",
665 | },
666 | },
667 | },
668 | },
669 | variants: {
670 | accessibility: ["responsive", "focus"],
671 | alignContent: ["responsive"],
672 | alignItems: ["responsive"],
673 | alignSelf: ["responsive"],
674 | appearance: ["responsive"],
675 | backgroundAttachment: ["responsive"],
676 | backgroundColor: ["responsive", "hover", "focus"],
677 | backgroundOpacity: ["responsive", "hover", "focus"],
678 | backgroundPosition: ["responsive"],
679 | backgroundRepeat: ["responsive"],
680 | backgroundSize: ["responsive"],
681 | borderCollapse: ["responsive"],
682 | borderColor: ["responsive", "hover", "focus"],
683 | borderOpacity: ["responsive", "hover", "focus"],
684 | borderRadius: ["responsive"],
685 | borderStyle: ["responsive"],
686 | borderWidth: ["responsive"],
687 | boxShadow: ["responsive", "hover", "focus"],
688 | boxSizing: ["responsive"],
689 | container: ["responsive"],
690 | cursor: ["responsive"],
691 | display: ["responsive"],
692 | divideColor: ["responsive"],
693 | divideOpacity: ["responsive"],
694 | divideWidth: ["responsive"],
695 | fill: ["responsive"],
696 | flex: ["responsive"],
697 | flexDirection: ["responsive"],
698 | flexGrow: ["responsive"],
699 | flexShrink: ["responsive"],
700 | flexWrap: ["responsive"],
701 | float: ["responsive"],
702 | clear: ["responsive"],
703 | fontFamily: ["responsive"],
704 | fontSize: ["responsive"],
705 | fontSmoothing: ["responsive"],
706 | fontStyle: ["responsive"],
707 | fontWeight: ["responsive", "hover", "focus"],
708 | height: ["responsive"],
709 | inset: ["responsive"],
710 | justifyContent: ["responsive"],
711 | letterSpacing: ["responsive"],
712 | lineHeight: ["responsive"],
713 | listStylePosition: ["responsive"],
714 | listStyleType: ["responsive"],
715 | margin: ["responsive"],
716 | maxHeight: ["responsive"],
717 | maxWidth: ["responsive"],
718 | minHeight: ["responsive"],
719 | minWidth: ["responsive"],
720 | objectFit: ["responsive"],
721 | objectPosition: ["responsive"],
722 | opacity: ["responsive", "hover", "focus"],
723 | order: ["responsive"],
724 | outline: ["responsive", "focus"],
725 | overflow: ["responsive"],
726 | overscrollBehavior: ["responsive"],
727 | padding: ["responsive"],
728 | placeholderColor: ["responsive", "focus"],
729 | placeholderOpacity: ["responsive", "focus"],
730 | pointerEvents: ["responsive"],
731 | position: ["responsive"],
732 | resize: ["responsive"],
733 | space: ["responsive"],
734 | stroke: ["responsive"],
735 | strokeWidth: ["responsive"],
736 | tableLayout: ["responsive"],
737 | textAlign: ["responsive"],
738 | textColor: ["responsive", "hover", "focus"],
739 | textOpacity: ["responsive", "hover", "focus"],
740 | textDecoration: ["responsive", "hover", "focus"],
741 | textTransform: ["responsive"],
742 | userSelect: ["responsive"],
743 | verticalAlign: ["responsive"],
744 | visibility: ["responsive"],
745 | whitespace: ["responsive"],
746 | width: ["responsive"],
747 | wordBreak: ["responsive"],
748 | zIndex: ["responsive"],
749 | gap: ["responsive"],
750 | gridAutoFlow: ["responsive"],
751 | gridTemplateColumns: ["responsive"],
752 | gridColumn: ["responsive"],
753 | gridColumnStart: ["responsive"],
754 | gridColumnEnd: ["responsive"],
755 | gridTemplateRows: ["responsive"],
756 | gridRow: ["responsive"],
757 | gridRowStart: ["responsive"],
758 | gridRowEnd: ["responsive"],
759 | transform: ["responsive"],
760 | transformOrigin: ["responsive"],
761 | scale: ["responsive", "hover", "focus"],
762 | rotate: ["responsive", "hover", "focus"],
763 | translate: ["responsive", "hover", "focus"],
764 | skew: ["responsive", "hover", "focus"],
765 | transitionProperty: ["responsive"],
766 | transitionTimingFunction: ["responsive"],
767 | transitionDuration: ["responsive"],
768 | transitionDelay: ["responsive"],
769 | animation: ["responsive"],
770 | },
771 | corePlugins: {},
772 | plugins: [require("@tailwindcss/typography")],
773 | }
774 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "include": ["./src/**/*"],
3 | "compilerOptions": {
4 | "target": "esnext",
5 | "module": "commonjs",
6 | "lib": ["dom", "es2017"],
7 | // "allowJs": true,
8 | // "checkJs": true,
9 | "jsx": "react",
10 | "strict": true,
11 | "esModuleInterop": true,
12 | "experimentalDecorators": true,
13 | "emitDecoratorMetadata": true,
14 | "noEmit": true,
15 | "skipLibCheck": true,
16 | "noImplicitAny": false,
17 | "resolveJsonModule": true
18 | }
19 | }
20 |
--------------------------------------------------------------------------------