Skip to content

Instantly share code, notes, and snippets.

View siriwatknp's full-sized avatar
🎯
Focusing

Siriwat K siriwatknp

🎯
Focusing
View GitHub Profile
@siriwatknp
siriwatknp / FormHelperText.js
Created April 4, 2024 03:51
Material UI styled v6 transformation
const FormHelperTextRoot = styled('p', {
name: 'MuiFormHelperText',
slot: 'Root',
overridesResolver: (props, styles) => {
const { ownerState } = props;
return [
styles.root,
ownerState.size && styles[`size${capitalize(ownerState.size)}`],
ownerState.contained && styles.contained,
ownerState.filled && styles.filled,
@siriwatknp
siriwatknp / Option A.css
Last active October 24, 2023 07:51
Joy Zero Runtime
/* generated CSS (~2.9kB) */
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[5].oneOf[7].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[5].oneOf[7].use[3]!./node_modules/@mui/zero-next-plugin/loaders/outputCssLoader.js??ruleSet[1].rules[13].use[0]!./src/app/joy-ui/button1/page.linaria.module.css ***!
\******************************************************************************************************************************************************************************************************************************************
|search |count |nbHits|
|-----------------------|------|------|
|button |123516|212 |
|icon |123302|641 |
|icons |104319|226 |
|grid |74673 |610 |
|table |65520 |131 |
|text |62600 |336 |
|card |59726 |71 |
|select |57837 |135 |
import * as fs from 'node:fs/promises';
import * as process from 'node:process';
import glob from 'fast-glob';
const grep = process.argv.slice(2).includes('--grep')
? new RegExp(process.argv.slice(2)[process.argv.slice(2).indexOf('--grep') + 1])
: null;
function attachEnclosingLine(lines, data) {
let lineNumber = data.number;
import * as fs from 'node:fs/promises';
import * as path from 'node:path';
import * as process from 'node:process';
import glob from 'fast-glob';
const grep = process.argv.slice(2).includes('--grep')
? new RegExp(process.argv.slice(2)[process.argv.slice(2).indexOf('--grep') + 1])
: null;
function lowerCaseFirst(s) {
@siriwatknp
siriwatknp / production.yml
Created December 31, 2019 07:50
Production Gatsby + Firebase hosting
name: Production Build and Deploy
on:
push:
branches:
- release/production
jobs:
build:
name: Build
runs-on: ubuntu-latest
@siriwatknp
siriwatknp / staging.yml
Created December 31, 2019 07:49
Staging Gatsby + Firebase hosting
name: Staging Build and Deploy
on:
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
@siriwatknp
siriwatknp / action.yml
Last active July 5, 2021 13:57
Github actions for Gatsby + firebase hosting
name: Build and Deploy
on:
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/styles';
const createChildStyles = () => ({
childRoot: {
borderRadius: 50,
backgroundColor: '#e7e7e7',
padding: '4px 12px',
display: 'inline-block',
@siriwatknp
siriwatknp / Child.jsx
Last active August 6, 2019 05:05
mui-styling
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from 'mui-styling';
import createStyles from './Child.styles';
const Child = withStyles(createStyles, { name: 'Child' })
(({ css }) => (
<div className={css.childRoot}>
<span className={css.childDot}>text</span>
</div>