Skip to content

Commit

Permalink
#24 Add immidiate className assign as propagated bem contexter
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrii Kirmas committed Mar 10, 2021
1 parent a003bbd commit 2d78cf0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/bem.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { BemAbsraction } from "./bem.core";
import type { CssModule } from "./definitions.defs";
import { bem2arr } from "./bem.core";
import { joinWithLead, picker } from "./core"
import { joinWithLead, picker, wrapper } from "./core"
import { EMPTY_OBJECT } from "./consts.json"

export {
Expand All @@ -15,10 +15,11 @@ function classBeming<
>(
context: Ctx = EMPTY_OBJECT as Ctx
) {
const {className} = context
//@ts-expect-error
const host = (arg0?, arg1?) => bem(context, arg0, arg1)

return host
return wrapper(host, className)
}

function bem<
Expand Down

0 comments on commit 2d78cf0

Please sign in to comment.