fix lint and reformat

This commit is contained in:
Pavel Prichodko 2023-03-13 19:22:51 +01:00
parent 86abc4df44
commit 069d89f71f
No known key found for this signature in database
GPG Key ID: 0EB8D75C775AB6F1
99 changed files with 160 additions and 201 deletions

View File

@ -2,43 +2,43 @@ name: CI
on:
push:
branches: ["main"]
branches: ['main']
pull_request:
types: [opened, synchronize]
jobs:
build:
name: Build and Test
timeout-minutes: 15
runs-on: ${{ matrix.os }}
name: Build and Test
timeout-minutes: 15
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 2
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Build
run: yarn build
- name: Build
run: yarn build
- name: Typecheck
run: yarn typecheck
- name: Typecheck
run: yarn typecheck
- name: Lint
run: yarn lint && yarn format:check
- name: Lint
run: yarn lint && yarn format:check
- name: Test
run: yarn test
- name: Test
run: yarn test

View File

@ -1,6 +1,3 @@
// eslint-disable-next-line eslint-comments/disable-enable-pair
/* eslint-disable import/namespace */
import { useRef } from 'react'
import { Composer, Messages } from '@status-im/components'
@ -25,7 +22,8 @@ export const ChannelScreen = ({ route }: ChannelScreenProps) => {
const theme = useTheme()
// We need to get the channel name from the route params
const channelName = route.params.channelId
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const _channelName = route.params.channelId
const scrollRef = useRef(null)
return (
@ -47,9 +45,7 @@ export const ChannelScreen = ({ route }: ChannelScreenProps) => {
<TouchableWithoutFeedback onPress={Keyboard.dismiss}>
<Stack>
<Composer
pb={insets.bottom + Platform.select({ android: 12, ios: 0 })}
/>
<Composer />
</Stack>
</TouchableWithoutFeedback>
</KeyboardAvoidingView>

View File

@ -4,7 +4,7 @@ import '@tamagui/core/reset.css'
import '@tamagui/font-inter/css/400.css'
import '@tamagui/font-inter/css/700.css'
import React from 'react'
import { StrictMode } from 'react'
import { Provider } from '@status-im/components'
import { createRoot } from 'react-dom/client'
@ -14,9 +14,9 @@ import App from './app'
const root = document.getElementById('root') as HTMLElement
createRoot(root).render(
<React.StrictMode>
<StrictMode>
<Provider>
<App />
</Provider>
</React.StrictMode>
</StrictMode>
)

View File

@ -1,4 +1,3 @@
import React from 'react'
import { Provider } from '../src'
import { Parameters, Decorator } from '@storybook/react'

View File

@ -1,4 +1,4 @@
import React, { useState } from 'react'
import { Fragment, useState } from 'react'
import { ChevronRightIcon } from '@status-im/icons/20'
import { Stack } from '@tamagui/core'
@ -104,9 +104,7 @@ const Accordion = ({
</AnimatePresence>
</Stack>
<AnimatePresence>
{isExpanded && (
<React.Fragment key={title}>{children}</React.Fragment>
)}
{isExpanded && <Fragment key={title}>{children}</Fragment>}
</AnimatePresence>
</Stack>
</Stack>

View File

@ -17,7 +17,7 @@ interface Props {
}
const Author = (props: Props) => {
const { name, status, nickname, address, time } = props
const { name, status, address, time } = props
return (
<XStack space={8} alignItems="center">

View File

@ -163,7 +163,7 @@ const Avatar = (props: Props) => {
useEffect(() => {
setStatus('idle')
}, [JSON.stringify(src)])
}, [src])
return (
<Base size={size} shape={shape} withOutline={withOutline}>

View File

@ -8,6 +8,7 @@ import type { GetProps } from '@tamagui/core'
import type { Ref } from 'react'
const Base = styled(Stack, {
tag: 'button',
name: 'Button',
accessibilityRole: 'button',

View File

@ -20,9 +20,10 @@ import { useChatDispatch, useChatState } from '../provider'
import { Reply } from '../reply'
interface Props {
blur: boolean
blur?: boolean
}
// pb={insets.bottom + Platform.select({ android: 12, ios: 0 })}
const Composer = (props: Props) => {
const { blur } = props

View File

@ -1,5 +1,3 @@
import React from 'react'
import { Stack } from '@tamagui/core'
import { Image } from './image'

View File

@ -1,7 +1,6 @@
import React from 'react'
import { PinIcon } from '@status-im/icons/16'
import { Stack, Unspaced, XStack, YStack } from 'tamagui'
import { View } from 'react-native'
import { Stack, styled, Unspaced, XStack, YStack } from 'tamagui'
import { Author } from '../author/author'
import { Avatar } from '../avatar'
@ -22,6 +21,27 @@ interface Props {
pinned?: boolean
}
const Wrapper = styled(View, {
position: 'relative',
paddingHorizontal: 8,
paddingVertical: 8,
borderRadius: 16,
alignItems: 'flex-start',
variants: {
active: {
true: {
backgroundColor: '$neutral-5',
},
},
pinned: {
true: {
backgroundColor: '$blue-50-opa-5',
},
},
} as const,
})
const Message = (props: Props) => {
const { text, images, reactions, reply, pinned } = props
@ -34,17 +54,10 @@ const Message = (props: Props) => {
const dispatch = useChatDispatch()
return (
<YStack
position="relative"
alignItems="flex-start"
paddingHorizontal={8}
paddingVertical={8}
borderRadius={16}
backgroundColor={
active ? '$neutral-5' : pinned ? '$blue-50-opa-5' : undefined
}
onMouseEnter={() => setHovered(true)}
onMouseLeave={() => setHovered(false)}
<Wrapper
active={active}
onHoverIn={() => setHovered(true)}
onHoverOut={() => setHovered(false)}
>
{active && (
<Unspaced>
@ -122,7 +135,7 @@ const Message = (props: Props) => {
)}
</YStack>
</XStack>
</YStack>
</Wrapper>
)
}

View File

@ -20,12 +20,12 @@ const interFont = createInterFont({
7: 13,
8: 15,
9: 19,
10: 27
10: 27,
},
weight: {
6: '400',
7: '500',
8: '600'
8: '600',
},
letterSpacing: {
5: 2,
@ -36,19 +36,19 @@ const interFont = createInterFont({
10: -3,
12: -4,
14: -5,
15: -6
15: -6,
},
face: {
400: { normal: 'Inter' },
500: { normal: 'Inter' },
600: { normal: 'InterBold' }
}
600: { normal: 'InterBold' },
},
})
const monoFont = createFont({
family: 'UbuntuMono',
weight: {
1: '500'
1: '500',
},
letterSpacing: {
5: 2,
@ -59,7 +59,7 @@ const monoFont = createFont({
10: -3,
12: -4,
14: -5,
15: -6
15: -6,
},
size: {
1: 11,
@ -77,25 +77,25 @@ const monoFont = createFont({
13: 72,
14: 92,
15: 114,
16: 124
16: 124,
},
lineHeight: {
1: 14,
2: 15
}
2: 15,
},
})
export const config = createTamagui({
fonts: {
inter: interFont,
mono: monoFont
mono: monoFont,
},
themes,
tokens: {
colors: {
...tokens.color
...tokens.color,
},
...tokens
...tokens,
},
shouldAddPrefersColorThemes: true,
media: createMedia({
@ -112,8 +112,8 @@ export const config = createTamagui({
short: { maxHeight: 820 },
tall: { minHeight: 820 },
hoverNone: { hover: 'none' },
pointerCoarse: { pointer: 'coarse' }
pointerCoarse: { pointer: 'coarse' },
}),
shorthands,
animations
animations,
})

View File

@ -1,5 +1,3 @@
import React from 'react'
import { Avatar, Dialog, TextInput } from '../../system'
export const EditGroupChatDialog = () => {

View File

@ -1,5 +1,3 @@
import React from 'react'
import { BellIcon } from '../../icons/bell-icon'
import { ContextMenu, DropdownMenu } from '../../system'
// import { useAlertDialog } from '../../system/dialog/alert-dialog'

View File

@ -1,5 +1,3 @@
import React from 'react'
import {
Avatar,
Dialog,

View File

@ -1,5 +1,3 @@
import React from 'react'
import { Text } from '../../system'
export const Failed = () => {

View File

@ -1,5 +1,3 @@
import React from 'react'
import ContentLoader from 'react-content-loader'
import { styled } from '../../styles/config'

View File

@ -1,4 +1,4 @@
import React, { useState } from 'react'
import { useState } from 'react'
import * as Collapsible from '@radix-ui/react-collapsible'

View File

@ -1,4 +1,4 @@
import React, { forwardRef } from 'react'
import { forwardRef } from 'react'
import { NavLink } from 'react-router-dom'

View File

@ -1,5 +1,3 @@
import React from 'react'
import { useSortedChats } from '../../../../protocol'
import { Box } from '../../../../system'
import { ChatCategory } from './chat-category'

View File

@ -1,5 +1,3 @@
import React from 'react'
import { useProtocol } from '../../../../protocol'
import { Button, CopyInput, Dialog, Flex, Grid, Text } from '../../../../system'

View File

@ -1,5 +1,3 @@
import React from 'react'
import { useProtocol } from '../../../../protocol'
import { styled } from '../../../../styles/config'
import { Avatar, DialogTrigger, Text } from '../../../../system'

View File

@ -1,4 +1,4 @@
import React, { useState } from 'react'
import { useState } from 'react'
import { styled } from '../../../../styles/config'
import { Dialog, Grid, Text } from '../../../../system'

View File

@ -1,5 +1,3 @@
import React from 'react'
import { useAccount } from '../../../../protocol'
import { Button, Flex } from '../../../../system'
import { Grid } from '../../../../system/grid'

View File

@ -1,4 +1,4 @@
import React, { useState } from 'react'
import { useState } from 'react'
import { QRCodeSVG } from 'qrcode.react'

View File

@ -1,5 +1,3 @@
import React from 'react'
import {
Avatar,
Dialog,

View File

@ -1,5 +1,3 @@
import React from 'react'
import { useAppState } from '../../contexts/app-context'
import { useAccount } from '../../protocol'
import { styled } from '../../styles/config'

View File

@ -1,5 +1,3 @@
import React from 'react'
import { useAccount } from '../../protocol'
import {
Avatar,

View File

@ -1,5 +1,3 @@
import React from 'react'
import { useAccount, useMembers } from '../../protocol'
import { styled } from '../../styles/config'
import { Grid, Heading } from '../../system'

View File

@ -1,7 +1,7 @@
import React from 'react'
import { Text } from '../../system'
import type React from 'react'
interface Props {
label: string
children: React.ReactElement[] | React.ReactElement

View File

@ -1,5 +1,3 @@
import React from 'react'
import { Avatar, EthAddress, Flex, Text } from '../../system'
import type { Member } from '../../protocol'

View File

@ -1,5 +1,3 @@
import React from 'react'
import { styled } from '../../styles/config'
import { Avatar, DialogTrigger, EthAddress, Flex, Text } from '../../system'
import { DisconnectDialog } from './disconnect-dialog'

View File

@ -1,10 +1,9 @@
import React from 'react'
import { useAccount } from '../../protocol'
import { styled } from '../../styles/config'
import { Flex, Image, Popover, PopoverTrigger } from '../../system'
import type { Reaction, Reactions } from '../../protocol'
import type React from 'react'
interface Props {
children: React.ReactElement

View File

@ -1,5 +1,3 @@
import React from 'react'
import { Avatar, Dialog, EmojiHash, Heading, Text } from '../../system'
import type { Member } from '../../protocol'

View File

@ -1,4 +1,4 @@
import React, { useState } from 'react'
import { useState } from 'react'
import { useProtocol } from '../../protocol'
import { Avatar, Checkbox, Dialog, Flex, Text } from '../../system'

View File

@ -1,6 +1,7 @@
import React, { createContext, useContext, useMemo, useReducer } from 'react'
import { createContext, useContext, useMemo, useReducer } from 'react'
import type { Config } from '../types/config'
import type React from 'react'
import type { Dispatch, Reducer } from 'react'
type Context = {

View File

@ -1,6 +1,7 @@
import React, { createContext, useContext, useMemo, useReducer } from 'react'
import { createContext, useContext, useMemo, useReducer } from 'react'
import type { Member, Message } from '../protocol'
import type React from 'react'
import type { Dispatch, Reducer } from 'react'
type Context = {

View File

@ -1,4 +1,6 @@
import React, { cloneElement, createContext, useContext, useState } from 'react'
import { cloneElement, createContext, useContext, useState } from 'react'
import type React from 'react'
const DialogContext = createContext<
((dialog: React.ReactElement) => void) | null

View File

@ -1,4 +1,4 @@
import React from 'react'
import type React from 'react'
export const BellIcon = (props: React.SVGProps<SVGSVGElement>) => {
return (

View File

@ -1,4 +1,4 @@
import React from 'react'
import type React from 'react'
export const ChevronDownIcon = (props: React.SVGProps<SVGSVGElement>) => {
return (

View File

@ -1,4 +1,4 @@
import React from 'react'
import type React from 'react'
export const ChevronRightIcon = (props: React.SVGProps<SVGSVGElement>) => {
return (

View File

@ -1,4 +1,4 @@
import React from 'react'
import type React from 'react'
export const CrossIcon = (props: React.SVGProps<SVGSVGElement>) => {
return (

View File

@ -1,4 +1,4 @@
import React from 'react'
import type React from 'react'
export const DotsIcon = (props: React.SVGProps<SVGSVGElement>) => {
return (

View File

@ -1,4 +1,4 @@
import React from 'react'
import type React from 'react'
export const DoubleTickIcon = (props: React.SVGProps<SVGSVGElement>) => {
return (

View File

@ -1,4 +1,4 @@
import React from 'react'
import type React from 'react'
export const EditIcon = (props: React.SVGProps<SVGSVGElement>) => {
return (

View File

@ -1,4 +1,4 @@
import React from 'react'
import type React from 'react'
export const EmojiIcon = (props: React.SVGProps<SVGSVGElement>) => {
return (

View File

@ -1,4 +1,4 @@
import React from 'react'
import type React from 'react'
export const ExitIcon = (props: React.SVGProps<SVGSVGElement>) => {
return (

View File

@ -1,4 +1,4 @@
import React from 'react'
import type React from 'react'
export const GifIcon = (props: React.SVGProps<SVGSVGElement>) => {
return (

View File

@ -1,4 +1,4 @@
import React from 'react'
import type React from 'react'
export const GroupIcon = (props: React.SVGProps<SVGSVGElement>) => {
return (

View File

@ -1,4 +1,4 @@
import React from 'react'
import type React from 'react'
export const ImageIcon = (props: React.SVGProps<SVGSVGElement>) => {
return (

View File

@ -1,4 +1,4 @@
import React from 'react'
import type React from 'react'
export const PencilIcon = (props: React.SVGProps<SVGSVGElement>) => {
return (

View File

@ -1,4 +1,4 @@
import React from 'react'
import type React from 'react'
export const PinIcon = (props: React.SVGProps<SVGSVGElement>) => {
return (

View File

@ -1,4 +1,4 @@
import React from 'react'
import type React from 'react'
export const ReactionIcon = (props: React.SVGProps<SVGSVGElement>) => {
return (

View File

@ -1,4 +1,4 @@
import React from 'react'
import type React from 'react'
export const ReplyIcon = (props: React.SVGProps<SVGSVGElement>) => {
return (

View File

@ -1,4 +1,4 @@
import React from 'react'
import type React from 'react'
export const StickerIcon = (props: React.SVGProps<SVGSVGElement>) => {
return (

View File

@ -1,4 +1,4 @@
import React from 'react'
import type React from 'react'
export const TinyChevronRightIcon = (props: React.SVGProps<SVGSVGElement>) => {
return (

View File

@ -1,5 +1,5 @@
// todo: add to /tiny folder
import React from 'react'
import type React from 'react'
export const TinyCommunityIcon = (props: React.SVGProps<SVGSVGElement>) => {
return (

View File

@ -1,4 +1,4 @@
import React from 'react'
import type React from 'react'
export const TinyReplyIcon = (props: React.SVGProps<SVGSVGElement>) => {
return (

View File

@ -1,4 +1,4 @@
import React from 'react'
import type React from 'react'
export const TrashIcon = (props: React.SVGProps<SVGSVGElement>) => {
return (

View File

@ -1,4 +1,4 @@
import React from 'react'
import type React from 'react'
export const UnpinIcon = (props: React.SVGProps<SVGSVGElement>) => {
return (

View File

@ -1,4 +1,4 @@
import React, { createContext, useEffect, useReducer } from 'react'
import { createContext, useEffect, useReducer } from 'react'
import { createClient } from '@status-im/js'
@ -6,6 +6,7 @@ import { Failed } from '../components/failed'
import { Loading } from '../components/loading'
import type { Account, Client, ClientOptions, Community } from '@status-im/js'
import type React from 'react'
export const Context = createContext<State | undefined>(undefined)

View File

@ -1,5 +1,3 @@
import React from 'react'
// import { PinIcon } from '../../../../icons/pin-icon'
import { Avatar, Flex, Text } from '../../../../system'

View File

@ -1,5 +1,3 @@
import React from 'react'
import { Dialog } from '../../../../system'
export const PinnedMessagesDialog = () => {

View File

@ -1,4 +1,4 @@
import React, { useEffect, useRef, useState } from 'react'
import { useEffect, useRef, useState } from 'react'
import { useChatContext } from '../../../../contexts/chat-context'
import { useAccount } from '../../../../protocol'
@ -10,6 +10,8 @@ import { styled } from '../../../../styles/config'
// import { Box, Flex, IconButton } from '../../../../system'
import { InputReply } from './input-reply'
import type React from 'react'
interface Props {
mode?: 'normal' | 'editing'
value?: string

View File

@ -1,5 +1,3 @@
import React from 'react'
import { useChatContext } from '../../../../contexts/chat-context'
import { CrossIcon } from '../../../../icons/cross-icon'
import { MessageContentType } from '../../../../protocol'

View File

@ -1,5 +1,3 @@
import React from 'react'
import { ReactionPopover } from '../../../../components/reaction-popover'
import { PencilIcon } from '../../../../icons/pencil-icon'
// import { PinIcon } from '../../../../icons/pin-icon'

View File

@ -1,4 +1,4 @@
import React, { useState } from 'react'
import { useState } from 'react'
import { useMatch } from 'react-router-dom'

View File

@ -1,5 +1,3 @@
import React from 'react'
import { MessageContentType, useProtocol } from '../../../../protocol'
import { styled } from '../../../../styles/config'
import { Avatar, Box, Flex, Image, Text } from '../../../../system'

View File

@ -1,4 +1,4 @@
import React, { useState } from 'react'
import { useState } from 'react'
import {
emojis,

View File

@ -1,5 +1,3 @@
import React from 'react'
import isSameDay from 'date-fns/isSameDay'
import { Flex, Text } from '../../../../system'

View File

@ -1,5 +1,3 @@
import React from 'react'
import { keyframes } from '../../../../styles/config'
import { Box, Text } from '../../../../system'

View File

@ -1,5 +1,3 @@
import React from 'react'
import ContentLoader from 'react-content-loader'
export const MessageLoader = () => {

View File

@ -1,4 +1,4 @@
import React, { Fragment, useState } from 'react'
import { Fragment, useState } from 'react'
import format from 'date-fns/format'
import isSameDay from 'date-fns/isSameDay'

View File

@ -1,5 +1,3 @@
import React from 'react'
import { useMatch } from 'react-router-dom'
// import { ChatMenu } from '../../../../components/chat-menu'

View File

@ -1,4 +1,4 @@
import React, { Fragment, useEffect, useRef } from 'react'
import { Fragment, useEffect, useRef } from 'react'
import isSameDay from 'date-fns/isSameDay'
import { useLocation, useMatch } from 'react-router-dom'

View File

@ -1,5 +1,3 @@
import React from 'react'
import {
BrowserRouter,
Navigate,

View File

@ -1,5 +1,3 @@
import React from 'react'
import { useNavigate } from 'react-router-dom'
import { styled } from '../../styles/config'

View File

@ -1,4 +1,4 @@
import React, { useMemo } from 'react'
import { useMemo } from 'react'
import { Image } from '../image'
import { Base, Content, Indicator, Initials } from './styles'

View File

@ -1,5 +1,3 @@
import React from 'react'
import { Text } from '../text'
import { Base } from './styles'

View File

@ -1,7 +1,7 @@
import React from 'react'
import { Button, Group } from './styles'
import type React from 'react'
interface Props<V> {
value: V
onChange: (value: V) => void

View File

@ -1,8 +1,9 @@
import React, { forwardRef } from 'react'
import { forwardRef } from 'react'
import { Base } from './styles'
import type { Variants } from './styles'
import type React from 'react'
import type { Ref } from 'react'
type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {

View File

@ -1,4 +1,4 @@
import React, { forwardRef } from 'react'
import { forwardRef } from 'react'
import { Text } from '../text'
import { Indicator, Root, Wrapper } from './styles'

View File

@ -1,4 +1,4 @@
import React, { cloneElement, useState } from 'react'
import { cloneElement, useState } from 'react'
import * as Primitive from '@radix-ui/react-context-menu'
@ -10,6 +10,7 @@ import type {
ContextMenuSeparatorProps,
ContextMenuTriggerProps,
} from '@radix-ui/react-context-menu'
import type React from 'react'
interface TriggerProps extends ContextMenuTriggerProps {
children: [React.ReactElement, React.ReactElement]

View File

@ -1,4 +1,4 @@
import React, { forwardRef, useRef } from 'react'
import { forwardRef, useRef } from 'react'
import { composeRefs } from '@radix-ui/react-compose-refs'

View File

@ -1,4 +1,4 @@
import React, { cloneElement, useCallback, useRef } from 'react'
import { cloneElement, useCallback, useRef } from 'react'
import * as Primitive from '@radix-ui/react-alert-dialog'
@ -12,6 +12,7 @@ import { Actions, Body, Content, Header, Overlay } from './styles'
import type { ButtonProps } from '../button'
import type { DialogContentProps } from '@radix-ui/react-dialog'
import type React from 'react'
interface TriggerProps {
open?: boolean

View File

@ -1,4 +1,4 @@
import React, { useCallback, useRef, useState } from 'react'
import { useCallback, useRef, useState } from 'react'
import * as Primitive from '@radix-ui/react-dialog'
@ -13,6 +13,7 @@ import { Actions, Body, Content, Header, Overlay } from './styles'
import type { ButtonProps } from '../button'
import type { Variants } from './styles'
import type { DialogContentProps } from '@radix-ui/react-dialog'
import type React from 'react'
interface DialogTriggerProps {
children: [React.ReactElement, React.ReactElement]

View File

@ -1,5 +1,3 @@
import React from 'react'
import * as Primitive from '@radix-ui/react-dropdown-menu'
import * as Menu from '../menu'
@ -10,6 +8,7 @@ import type {
DropdownMenuSeparatorProps,
DropdownMenuTriggerProps,
} from '@radix-ui/react-dropdown-menu'
import type React from 'react'
interface TriggerProps extends DropdownMenuTriggerProps {
children: [React.ReactElement, React.ReactElement]

View File

@ -1,5 +1,3 @@
import React from 'react'
import { Base } from './styles'
interface Props {

View File

@ -1,5 +1,3 @@
import React from 'react'
import { Text } from '../text'
import type { TextProps } from '../text'

View File

@ -1,4 +1,4 @@
import React, { forwardRef } from 'react'
import { forwardRef } from 'react'
import { AccessibleIcon } from '@radix-ui/react-accessible-icon'
import { Link } from 'react-router-dom'
@ -7,6 +7,7 @@ import { Base } from './styles'
import type { Variants } from './styles'
import type Stitches from '@stitches/react'
import type React from 'react'
import type { Ref } from 'react'
import type { LinkProps } from 'react-router-dom'

View File

@ -1,7 +1,9 @@
import React, { cloneElement } from 'react'
import { cloneElement } from 'react'
import { Root } from '@radix-ui/react-accessible-icon'
import type React from 'react'
type Props = ({ label: string; hidden?: false } | { hidden: true }) & {
children: React.ReactElement
}

View File

@ -1,5 +1,3 @@
import React from 'react'
import { Base } from './styles'
import type { Variants } from './styles'

View File

@ -1,10 +1,12 @@
import React, { cloneElement } from 'react'
import { cloneElement } from 'react'
import { ChevronRightIcon } from '../../icons/chevron-right-icon'
import { styled, theme } from '../../styles/config'
import { Box } from '../box'
import { Icon } from '../icon'
import type React from 'react'
const Content = styled('div', {
minWidth: 176,
padding: '8px 0',

View File

@ -1,4 +1,4 @@
import React, { cloneElement, forwardRef } from 'react'
import { cloneElement, forwardRef } from 'react'
import * as Primitive from '@radix-ui/react-popover'
@ -6,6 +6,7 @@ import { Content } from './styles'
import type { PopoverContentProps } from '@radix-ui/react-popover'
import type Stitches from '@stitches/react'
import type React from 'react'
import type { Ref } from 'react'
interface TriggerProps {

View File

@ -1,4 +1,4 @@
import React, { useState } from 'react'
import { useState } from 'react'
import * as TabsPrimitive from '@radix-ui/react-tabs'

View File

@ -1,5 +1,3 @@
import React from 'react'
import { useNavigate } from 'react-router-dom'
import { TinyChevronRightIcon } from '../../icons/tiny-chevron-right-icon'

View File

@ -1,9 +1,10 @@
import React, { forwardRef } from 'react'
import { forwardRef } from 'react'
import { Box } from '../box'
import { Text } from '../text'
import { Base } from './styles'
import type React from 'react'
import type { Ref } from 'react'
type InputProps = React.InputHTMLAttributes<HTMLInputElement>

View File

@ -1,4 +1,4 @@
import React, { cloneElement, forwardRef } from 'react'
import { cloneElement, forwardRef } from 'react'
import * as Primitive from '@radix-ui/react-tooltip'
@ -8,6 +8,7 @@ import type {
TooltipArrowProps,
TooltipContentProps,
} from '@radix-ui/react-tooltip'
import type React from 'react'
import type { Ref } from 'react'
interface Props {

View File

@ -1,7 +1,7 @@
import React from 'react'
import { Root } from '@radix-ui/react-visually-hidden'
import type React from 'react'
type Props = {
children: React.ReactNode
}