Skip to content

Turn your site gray and automatically cancel it at a certain time

License

Notifications You must be signed in to change notification settings

baboon-king/grays

This branch is up to date with main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

98e37cb · Mar 14, 2024

History

18 Commits
Mar 12, 2024
Mar 12, 2024
Dec 1, 2022
Mar 12, 2024
Dec 1, 2022
Dec 1, 2022
Dec 1, 2022
Dec 1, 2022
Dec 1, 2022
Mar 12, 2024
Mar 12, 2024
Mar 12, 2024
Mar 12, 2024
Mar 14, 2024
Dec 1, 2022

Repository files navigation

grays

Turn your site gray and automatically cancel it at a certain time

Instal

pnpm i grays

#or

npm i grays

#or

yarn add grays

Basic Used

import { grays } from "grays";

grays();

Custom Graysale

import { grays } from "grays";

grays("html", 60);

Immediate (Default behavior)

import { grays } from "grays";

grays("html", 99, {
  immediate: true,
});

Automatic expiration on Immediate

import { grays } from "grays";

grays("html", 99, {
  expire: new Date(2022, 11, 1).getTime() // Expires automatically after "2022-12-1
  immediate: true,
});

Custom ClassName

import { grays } from "grays";

grays("html", 99, {
  className: "grays-for",
});

API

import { grays } from "grays";

const { cancel, apply } = grays();

About

Turn your site gray and automatically cancel it at a certain time

Topics

Resources

License

Stars

Watchers

Forks