Skip to content

Instantly share code, notes, and snippets.

View Vanss472's full-sized avatar
🎯
Focusing

Vanessa Martinez Vanss472

🎯
Focusing
View GitHub Profile

Add Tailwind CSS v4 in Shopify Theme

  1. Initial package manager with npm or yarn by running
npm init

#or
@Vanss472
Vanss472 / RichText.tsx
Last active October 18, 2021 22:58
Contentful Rich Text
import React from 'react'
import {
Block,
BLOCKS,
Inline,
INLINES,
MARKS,
} from '@contentful/rich-text-types'
import { renderRichText } from 'gatsby-source-contentful/rich-text'
import * as styles from './rich-text.module.css'
@Vanss472
Vanss472 / App.js
Last active February 3, 2021 20:50
// 1. removed the setData argument from the useEffect since we dont need to check for this
// we can use userId to re-run the effect if userId changes
// 2. added a suspense fallback
// 3. added export default UserProfileList to the end of the file
import { Suspense, useState, useEffect } from "react";
import { fetchUserProfile } from "./profiles";
const SuspensefulUserProfile = ({ userId }) => {
const [data, setData] = useState({});
<!--
In the past, the DOCTYPE was needed to specify HTML versions.
As of HTML5, providing `html` is sufficient.
It is somewhere between a proper HTML tag, and an HTML comment.
-->
<!DOCTYPE html>
<!-- Add the appropriate language for your site -->
<html lang="en">
<head>
<!--
@Vanss472
Vanss472 / CSS-Reset.css
Last active May 19, 2020 15:20
CSS Reset
// reset <button>
@mixin reset-button {
margin: 0;
padding: 0;
background-color: transparent;
border: none;
cursor: pointer;
appearance: none;
border-radius: 0;
}
@Vanss472
Vanss472 / manual-setup.md
Created May 5, 2020 18:18
Start a React Project from scratch
  • Create .gitignore
  • Create README.md
  • Create package.json $ npm init or $ yarn init
  • Install dependencies
  • Run dev
  • Run build
"scripts": {
 "dev": "webpack-dev-server --open",
@Vanss472
Vanss472 / README.md
Created May 4, 2020 21:03
ReadMe template for projects

Repo Title

Overview

Description

Install

$ yarn install
@Vanss472
Vanss472 / .gitignore
Created May 4, 2020 20:57
Gitignore template for project
# .gitignore
.DS_*
*.log
logs
**/*.backup.*
**/*.back.*
.git
.sass-cache