Skip to content

Commit 8b625ad

Browse files
committed
refactor(alpha-token-provider): rename TokenProvider to AlphaTokenProvider
1 parent c870003 commit 8b625ad

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

packages/bezier-react/src/components/AlphaTokenProvider/TokenProvider.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client'
22

3-
import React, { useMemo } from 'react'
3+
import { useMemo } from 'react'
44

55
import { tokens } from '@channel.io/bezier-tokens/alpha'
66

@@ -13,10 +13,11 @@ import {
1313
type TokenProviderProps,
1414
} from './TokenProvider.types'
1515

16-
const [AlphaTokenContextProvider, useAlphaTokenContext] =
16+
const [TokenContextProvider, useTokenContext] =
17+
// FIXME: (@ed) Change the name to TokenProvider after the migration is done
1718
createContext<TokenContextValue | null>(null, 'AlphaTokenProvider')
1819

19-
export { useAlphaTokenContext }
20+
export { useTokenContext as useAlphaTokenContext }
2021

2122
const tokenSet: Record<ThemeName, ThemeSpecificTokens> = Object.freeze({
2223
light: {
@@ -34,7 +35,7 @@ const tokenSet: Record<ThemeName, ThemeSpecificTokens> = Object.freeze({
3435
*/
3536
export function TokenProvider({ themeName, children }: TokenProviderProps) {
3637
return (
37-
<AlphaTokenContextProvider
38+
<TokenContextProvider
3839
value={useMemo(
3940
() => ({
4041
themeName,
@@ -44,6 +45,6 @@ export function TokenProvider({ themeName, children }: TokenProviderProps) {
4445
)}
4546
>
4647
{children}
47-
</AlphaTokenContextProvider>
48+
</TokenContextProvider>
4849
)
4950
}

0 commit comments

Comments
 (0)