Skip to content

Instantly share code, notes, and snippets.

View segunadebayo's full-sized avatar
😃

Segun Adebayo segunadebayo

😃
View GitHub Profile
@segunadebayo
segunadebayo / txt.md
Created April 14, 2023 19:26
webpack-plugin.md
const childProcess = require('child_process')
// gaze是用于监听文件变化的工具
const Gaze = require('gaze');
// 有更友好展示的console
const consola = require('consola')

class MyPlugin {
  // 将 `apply` 定义为其原型方法,此方法以 compiler 作为参数
  apply(compiler) {
@segunadebayo
segunadebayo / external.mdx
Last active March 25, 2024 13:30
zag: virtualized select
const items = ['React', 'Solid', 'Vue']

const Basic = () => {
  const contentRef = useRef(null)

  const api = useVirtualizer({
    count: items.length,
    getScrollElement: () => contentRef.current,
    estimateSize: () => 35,
@segunadebayo
segunadebayo / base.ts
Last active April 13, 2024 22:34
vanilla-extract
import { defineProperties, createSprinkles } from '@vanilla-extract/sprinkles'
const typographyProperties = defineProperties({
...responsiveProperties,
properties: {
fontSize: fontSizePairings,
lineHeight: lineHeights,
fontWeight: fontWeights,
letterSpacing: letterSpacings,
textAlign: ['left', 'right', 'center'],
@segunadebayo
segunadebayo / cli.md
Last active June 21, 2024 16:35
chakra-v3-proposal

CLI ideas

chakra compose

This command will allow you import component compositions into your project.

By default, it'll import all component compositions.

## add a specific component