Skip to content

Instantly share code, notes, and snippets.

View bluebeel's full-sized avatar

Saïkou Barry bluebeel

View GitHub Profile
@bluebeel
bluebeel / README.md
Created October 13, 2021 15:46 — forked from benknight/README.md
[use-carousel] Headless UI React hook for building a scroll-based carousel

[use-carousel] Headless UI React hook for building a scroll-based carousel

BYO-UI. No CSS necessary. Inspired by react-table.

Usage:

const {
  getLeftNavProps,
 getRightNavProps,
@bluebeel
bluebeel / readme.md
Created June 30, 2021 18:14 — forked from slava-vishnyakov/readme.md
How to upload images with TipTap editor
  1. Create a file Image.js from the source below (it is almost a copy of Image.js from tiptap-extensions except that it has a constructor that accepts uploadFunc (function to be called with image being uploaded) and additional logic if(upload) { ... } else { ... previous base64 logic .. } in the new Plugin section.
import {Node, Plugin} from 'tiptap'
import {nodeInputRule} from 'tiptap-commands'

/**
 * Matches following attributes in Markdown-typed image: [, alt, src, title]
 *
@bluebeel
bluebeel / Final Tailwind UI Transition.tsx
Last active August 4, 2021 01:23 — forked from stevecastaneda/ModalExample.tsx
Modified Transition React Component to Support Nested Transitions - Typescript
// JSX Version by Adam Wathan: https://gist.github.com/adamwathan/e0a791aa0419098a7ece70028b2e641e
import React, { ReactNode } from "react";
import { CSSTransition as ReactCSSTransition } from "react-transition-group";
import { useRef, useEffect, useContext } from "react";
interface TransitionProps {
show?: boolean;
enter?: string;
enterFrom?: string;
@bluebeel
bluebeel / useTheme2.tsx
Created April 25, 2020 20:16 — forked from timc1/useTheme2.tsx
🌑☀️core app system/light/dark mode theming + varying themes for nested components
import * as React from "react";
type ThemeConfig = "system" | "light" | "dark";
type ThemeName = "light" | "dark";
// Custom themes are keyed by a unique id.
type KeyedThemes = {
[k: string]: {
config: ThemeConfig;
themeName: ThemeName;
};
@bluebeel
bluebeel / App.js
Created March 22, 2020 16:42 — forked from gvdonovan/App.js
TW UI Application Shell - React
import React, { Component } from "react";
import UserProfileMenu from "./UserProfileMenu";
function classNames(...classes) { return classes.filter(Boolean).join(" "); }
class App extends Component {
constructor(props) {
super(props);
this.state = { isToggleOn: false };
}