import plugin from 'tailwindcss/plugin';
import cssEscape from 'css.escape';
/** @type {import('tailwindcss').Config} */
export default {
content: [],
import { createHigherOrderComponent } from '@wordpress/compose'; | |
import * as wpHooks from '@wordpress/hooks'; | |
import { BlockControls, InspectorControls } from '@wordpress/block-editor'; | |
import { PanelBody, PanelRow } from '@wordpress/components'; | |
import { Icon, backup as backupIcon } from '@wordpress/icons'; | |
import { Post, useEntityRecord } from '@wordpress/core-data'; | |
import { store as coreStore } from '@wordpress/core-data'; | |
import { useSelect, useDispatch } from '@wordpress/data'; | |
import { BlockEditProps } from '@wordpress/blocks'; |
In the #51327 PR by @torounit is emerged that on an other PR #42605 a "rename" block features is "booked" to be assigned to double click
shortcut.
The rename features is currently work in progress and is tracked at #42605 .
In a short discussion it's also emerged that "expand collapse" is a power user feature, so it is a good idea that its shortcut is under a modifier key (ctrl
in Window and cmd
in MacOS).
I would expect that double click would be to rename. Expand the entire tree feels like a power user level feature and so it would be ok to have this behind a modifier key requirement.
Originally posted by @getdave in WordPress/gutenberg#51327 (comment)
/* eslint-disable @next/next/no-img-element */ | |
import React, { useRef } from 'react'; | |
import cx from 'classnames'; | |
import useIntersectionObserver from './hooks/use-intersection-observer'; | |
type MarqueeProps = { | |
imagesUrls: string[], | |
}; | |
export const ImagesSlider_WithPlainCSS = ({ imagesUrls }: MarqueeProps) => { |
// Here we generate the "theme.json" programmatically | |
import resolveConfig from "tailwindcss/resolveConfig.js"; | |
import * as tailwindConfig from "../tailwind.config.js"; | |
import * as fs from 'fs'; | |
import path from 'path'; | |
import { fileURLToPath } from 'url'; | |
// Utility - Disk | |
const __filename = fileURLToPath(import.meta.url); | |
const __dirname = path.dirname(__filename); |
In this blog post we create a small React library and publish it to NPM.
We'll go through all steps required to do that.
Let's begin.
The library we will publish (package
from now on) is written in Typescript, bundled with tsup
, versioned and published with changeset
.
To test the package we create one example app with Next.js
and one with Vite
.
/** | |
* Generic setTimeout implementation with Promise, used for wait some time then do something. | |
* Generally used for simulating async operation execution time while developing. | |
* @param time Time to wait for, in ms. | |
* @param returnValue Optional. What will be returned from the promise. | |
* @returns Promise that always resolve with "returnValue" after "time" ms. | |
*/ | |
export const sleep = <T,>(time: number, returnValue?: T) => new Promise<T | undefined>(resolve => setTimeout(() => resolve(returnValue), time)); |
import { useScrollRestoration } from "./use-scroll-restoration"; | |
type AppShellProps = { | |
content: React.ReactNode; | |
topBar?: React.ReactNode; | |
bottomBar?: React.ReactNode; | |
}; | |
export const AppShell = ({ content, topBar, bottomBar }: AppShellProps) => { | |
useScrollRestoration(); |
Dal mio punto di vista troverei utili queste funzioni:
- Creare inserizoni multiple partendo da un modello.
Ora è possibile scegliere un modello solo con l'inserzione singola
percò chi ha intenzione di creare più inserzioni partendo da un modello
deve prima creare una inserzione partendo da un modello
con
Crea Inserzione > Crea inserzione singola
, e successivamente duplicare l'inserzione appena creata N volte