-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: calculate body class names seperately
- Loading branch information
Showing
5 changed files
with
50 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import {block, blockNew} from '../utils/cn'; | ||
|
||
import type {RealTheme} from './types'; | ||
|
||
const ROOT_CLASS_NAME = 'root'; | ||
|
||
const bNew = blockNew(ROOT_CLASS_NAME); | ||
const b = block(ROOT_CLASS_NAME); | ||
|
||
export function getDeprecatedBodyRootClassName( | ||
modifier?: Record<string, string | boolean | undefined>, | ||
) { | ||
return b(modifier); | ||
} | ||
export function getBodyRootClassName( | ||
modifier?: Record<string, string | boolean | undefined>, | ||
addition?: string[], | ||
) { | ||
return bNew(modifier, addition); | ||
} | ||
|
||
export function getBaseBodyRootClassName(theme?: RealTheme) { | ||
return getBodyRootClassName({theme}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters