Consistent imports

This commit is contained in:
Eric Bailey
2024-01-18 14:10:48 -06:00
parent 175466ade6
commit 1514ffd6e9
10 changed files with 49 additions and 89 deletions
+5 -13
View File
@@ -38,7 +38,7 @@ const Context = React.createContext<{
export type RootProps = React.PropsWithChildren<{isInvalid?: boolean}>
function Root({children, isInvalid = false}: RootProps) {
export function Root({children, isInvalid = false}: RootProps) {
const inputRef = React.useRef<TextInput>(null)
const rootRef = React.useRef<View>(null)
const {
@@ -226,9 +226,9 @@ export function createInput(Component: typeof TextInput) {
}
}
const Input = createInput(TextInput)
export const Input = createInput(TextInput)
function Label({children}: React.PropsWithChildren<{}>) {
export function Label({children}: React.PropsWithChildren<{}>) {
const t = useTheme()
return (
<Text style={[a.text_sm, a.font_bold, t.atoms.text_contrast_600, a.mb_sm]}>
@@ -237,7 +237,7 @@ function Label({children}: React.PropsWithChildren<{}>) {
)
}
function Icon({icon: Comp}: {icon: React.ComponentType<SVGIconProps>}) {
export function Icon({icon: Comp}: {icon: React.ComponentType<SVGIconProps>}) {
const t = useTheme()
const ctx = React.useContext(Context)
const {hover, focus, errorHover, errorFocus} = React.useMemo(() => {
@@ -286,7 +286,7 @@ function Icon({icon: Comp}: {icon: React.ComponentType<SVGIconProps>}) {
)
}
function Suffix({
export function Suffix({
children,
label,
accessibilityHint,
@@ -322,11 +322,3 @@ function Suffix({
</Text>
)
}
export default {
Root,
Input,
Label,
Icon,
Suffix,
}