mirror of
https://github.com/versia-pub/docs.git
synced 2025-12-06 06:18:19 +01:00
feat: ✨ Add barrel roll easter egg
This commit is contained in:
parent
9b75c25fa0
commit
76d28e04a3
|
|
@ -301,6 +301,21 @@ const SearchInput = forwardRef<
|
||||||
autocompleteState.status === "stalled" ? "pr-11" : "pr-4",
|
autocompleteState.status === "stalled" ? "pr-11" : "pr-4",
|
||||||
)}
|
)}
|
||||||
{...inputProps}
|
{...inputProps}
|
||||||
|
onInput={(event) => {
|
||||||
|
if (
|
||||||
|
event.currentTarget.value
|
||||||
|
.toLowerCase()
|
||||||
|
.includes("barrel roll")
|
||||||
|
) {
|
||||||
|
event.currentTarget.value = "";
|
||||||
|
document.body.classList.add("animate-roll");
|
||||||
|
setTimeout(
|
||||||
|
() =>
|
||||||
|
document.body.classList.remove("animate-roll"),
|
||||||
|
2000,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}}
|
||||||
onKeyDown={(event) => {
|
onKeyDown={(event) => {
|
||||||
if (
|
if (
|
||||||
event.key === "Escape" &&
|
event.key === "Escape" &&
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,15 @@ export default {
|
||||||
7.5: "0.075",
|
7.5: "0.075",
|
||||||
15: "0.15",
|
15: "0.15",
|
||||||
},
|
},
|
||||||
|
animation: {
|
||||||
|
roll: "roll 2s 1 ease-in-out",
|
||||||
|
},
|
||||||
|
keyframes: {
|
||||||
|
roll: {
|
||||||
|
"0%": { transform: "rotate(0deg)" },
|
||||||
|
"100%": { transform: "rotate(360deg)" },
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [typographyPlugin, headlessuiPlugin],
|
plugins: [typographyPlugin, headlessuiPlugin],
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue