From 8a9264e91efe9f6533124da7ed4b6067d4f748e2 Mon Sep 17 00:00:00 2001 From: Mark Lawlor Date: Mon, 27 Jun 2022 12:27:20 +1000 Subject: [PATCH] fix: bug fixes after group-isolate rename --- src/tailwind/native/{component.ts => group-isolate.ts} | 2 +- src/tailwind/native/index.ts | 4 ++-- website/docs/core-concepts/states.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename src/tailwind/native/{component.ts => group-isolate.ts} (77%) diff --git a/src/tailwind/native/component.ts b/src/tailwind/native/group-isolate.ts similarity index 77% rename from src/tailwind/native/component.ts rename to src/tailwind/native/group-isolate.ts index 49266f2..b56fd6e 100644 --- a/src/tailwind/native/component.ts +++ b/src/tailwind/native/group-isolate.ts @@ -1,6 +1,6 @@ import { CustomPluginFunction } from "./types"; -export const component: CustomPluginFunction = ({ addVariant }) => { +export const groupIsolate: CustomPluginFunction = ({ addVariant }) => { addVariant("group-isolate-hover", "&::group-isolate-hover"); addVariant("group-isolate-active", "&::group-isolate-active"); addVariant("group-isolate-focus", "&::group-isolate-focus"); diff --git a/src/tailwind/native/index.ts b/src/tailwind/native/index.ts index c3a5613..813548e 100644 --- a/src/tailwind/native/index.ts +++ b/src/tailwind/native/index.ts @@ -1,7 +1,7 @@ import plugin from "tailwindcss/plugin"; import { StyleError } from "../../types/common"; import { boxShadow } from "./box-shadow"; -import { component } from "./component"; +import { groupIsolate } from "./group-isolate"; import { divide } from "./divide"; import { elevation } from "./elevation"; import { fontSize } from "./font-size"; @@ -56,7 +56,7 @@ export const nativePlugin = plugin.withOptions( translate(helpers, notSupported); skew(helpers, notSupported); boxShadow(helpers, notSupported); - component(helpers, notSupported); + groupIsolate(helpers, notSupported); parent(helpers, notSupported); }; }, diff --git a/website/docs/core-concepts/states.md b/website/docs/core-concepts/states.md index a774ab0..d325d6b 100644 --- a/website/docs/core-concepts/states.md +++ b/website/docs/core-concepts/states.md @@ -87,7 +87,7 @@ const App = () => { group-isolate-hover:text-blue-500 group-isolate-active:text-red-500 `}> - Text in a child group - hover and click me! + Child group-isolate have their own state!