Skip to content

Commit e38d0e0

Browse files
committed
feat: Fix useTailwindStyles() hook in Storybook
1 parent 7500a8f commit e38d0e0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

features/links-page/screens/BioScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ export const BioScreen = (props: BioScreenProps) => {
250250
<RadioGroup.Option value="value-3" label="Option 3" />
251251
</RadioGroup>
252252
253-
<View tw="h-10" />
253+
<View tw="h-20" />
254254
255255
{/**/}
256256
</View>

packages/@aetherspace/styles/useTailwindStyles.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
import { useMemo } from 'react'
2+
// Types
3+
import { TailwindFn } from 'twrnc'
24
// Context
35
import { useAetherContext } from '../context'
46

57
/** --- useTailwindStyles() ------------------------------------------------------------------------ */
68
/** -i- React hook to extract style values from your tailwind twrnc theme classnames. */
79
export const useTailwindStyles = (twClasses: string) => {
810
// Context
9-
const { tailwind } = useAetherContext()
11+
const aetherContext = useAetherContext()
12+
13+
// Vars
14+
const tailwind: TailwindFn = globalThis?.tailwindFn ?? aetherContext?.tailwind
1015

1116
// Memoize
1217
const twStyles = useMemo(() => {

0 commit comments

Comments
 (0)