Skip to content

Instantly share code, notes, and snippets.

import React from 'react'
import Figure from './Figure'
import Gist from 'super-react-gist';
const serializers = {
types: {
authorReference: ({node}) => <span>{node.author.name}</span>,
mainImage: Figure,
gist: ({node}) => {
@TheEskhaton
TheEskhaton / ChakraSample.jsx
Created October 12, 2020 17:59
Chakra Sample
// Sample component from airbnb.com
<Box>
<Image rounded="md" src="https://bit.ly/2k1H1t6"/>
<Flex align="baseline" mt={2}>
<Badge variantColor="pink">Plus</Badge>
<Text
ml={2}
textTransform="uppercase"
fontSize="sm"
import { ChakraProvider, theme } from "@chakra-ui/core";
import { merge } from "@chakra-ui/utils";
import Head from "next/head";
// 2. Extend the theme to include custom colors, fonts, etc.
const stackpalTheme = merge(theme, {
colors: {
brand: {
50: "#d8ffff",
100: "#acffff",
const signinButtonColor = useColorModeValue("brand.700", "brand.50");
<Button
size="sm"
fontSize="xs"
bg="none"
color={signinButtonColor}
mt="2"
onClick={() => setIsForgottenPasswordMode(true)}
>
import { ColorModeScript } from "@chakra-ui/core"
import Document, { Head, Html, Main, NextScript } from 'next/document'
class MyDocument extends Document {
render() {
return (
<Html>
<Head />
<body>
<ColorModeScript initialColorMode="light"></ColorModeScript>
const { colorMode, toggleColorMode } = useColorMode();
module.exports = {
purge: {
content: ["./Pages/**/*.razor", "./Shared/**/*.razor"],
},
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
},
variants: {
extend: {},
module.exports = {
plugins: [require("tailwindcss"), require("autoprefixer")],
};
@tailwind base;
@tailwind components;
@tailwind utilities;
{
"name": "blazortailwind",
"version": "1.0.0",
"description": "",
"main": "index",
"dependencies": {
"autoprefixer": "^10.0.2",
"postcss": "^8.1.8",
"postcss-cli": "^8.3.0",
"tailwindcss": "^2.0.1"