about summary refs log tree commit diff
path: root/src/components/Admonition.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/Admonition.tsx')
-rw-r--r--src/components/Admonition.tsx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/components/Admonition.tsx b/src/components/Admonition.tsx
index 8df4934be..cdb1f0b8b 100644
--- a/src/components/Admonition.tsx
+++ b/src/components/Admonition.tsx
@@ -1,13 +1,13 @@
-import React from 'react'
-import {StyleProp, View, ViewStyle} from 'react-native'
+import {createContext, useContext} from 'react'
+import {type StyleProp, View, type ViewStyle} from 'react-native'
 
 import {atoms as a, useBreakpoints, useTheme} from '#/alf'
-import {Button as BaseButton, ButtonProps} from '#/components/Button'
+import {Button as BaseButton, type ButtonProps} from '#/components/Button'
 import {CircleInfo_Stroke2_Corner0_Rounded as ErrorIcon} from '#/components/icons/CircleInfo'
 import {Eye_Stroke2_Corner0_Rounded as InfoIcon} from '#/components/icons/Eye'
 import {Leaf_Stroke2_Corner0_Rounded as TipIcon} from '#/components/icons/Leaf'
 import {Warning_Stroke2_Corner0_Rounded as WarningIcon} from '#/components/icons/Warning'
-import {Text as BaseText, TextProps} from '#/components/Typography'
+import {Text as BaseText, type TextProps} from '#/components/Typography'
 
 export const colors = {
   warning: {
@@ -20,13 +20,13 @@ type Context = {
   type: 'info' | 'tip' | 'warning' | 'error'
 }
 
-const Context = React.createContext<Context>({
+const Context = createContext<Context>({
   type: 'info',
 })
 
 export function Icon() {
   const t = useTheme()
-  const {type} = React.useContext(Context)
+  const {type} = useContext(Context)
   const Icon = {
     info: InfoIcon,
     tip: TipIcon,