diff --git a/hyperglass/ui/components/card/body.tsx b/hyperglass/ui/components/card/body.tsx index f6aa4e8..b87d1bd 100644 --- a/hyperglass/ui/components/card/body.tsx +++ b/hyperglass/ui/components/card/body.tsx @@ -3,7 +3,7 @@ import { useColorValue } from '~/context'; import type { TCardBody } from './types'; -export const CardBody: React.FC = (props: TCardBody) => { +export const CardBody = (props: TCardBody): JSX.Element => { const { onClick, ...rest } = props; const bg = useColorValue('white', 'dark.500'); const color = useColorValue('dark.500', 'white'); diff --git a/hyperglass/ui/components/card/footer.tsx b/hyperglass/ui/components/card/footer.tsx index 13024ff..444a7dd 100644 --- a/hyperglass/ui/components/card/footer.tsx +++ b/hyperglass/ui/components/card/footer.tsx @@ -2,7 +2,7 @@ import { Flex } from '@chakra-ui/react'; import type { TCardFooter } from './types'; -export const CardFooter: React.FC = (props: TCardFooter) => ( +export const CardFooter = (props: TCardFooter): JSX.Element => ( = (props: TCardHeader) => { +export const CardHeader = (props: TCardHeader): JSX.Element => { const { children, ...rest } = props; const bg = useColorValue('blackAlpha.50', 'whiteAlpha.100'); return ( diff --git a/hyperglass/ui/components/codeBlock.tsx b/hyperglass/ui/components/codeBlock.tsx index 7b8868f..ad37b9c 100644 --- a/hyperglass/ui/components/codeBlock.tsx +++ b/hyperglass/ui/components/codeBlock.tsx @@ -3,7 +3,7 @@ import { useColorValue } from '~/context'; import type { BoxProps } from '@chakra-ui/react'; -export const CodeBlock: React.FC = (props: BoxProps) => { +export const CodeBlock = (props: BoxProps): JSX.Element => { const bg = useColorValue('blackAlpha.100', 'gray.800'); const color = useColorValue('black', 'white'); return ( diff --git a/hyperglass/ui/components/countdown/countdown.tsx b/hyperglass/ui/components/countdown/countdown.tsx index 6c5b869..e1eb56c 100644 --- a/hyperglass/ui/components/countdown/countdown.tsx +++ b/hyperglass/ui/components/countdown/countdown.tsx @@ -1,11 +1,11 @@ -import { Text } from '@chakra-ui/react'; +import { chakra, Text } from '@chakra-ui/react'; import ReactCountdown, { zeroPad } from 'react-countdown'; import { If } from '~/components'; import { useColorValue } from '~/context'; import type { TCountdown, TRenderer } from './types'; -const Renderer: React.FC = (props: TRenderer) => { +const Renderer = (props: TRenderer): JSX.Element => { const { hours, minutes, seconds, completed, text } = props; const time = [zeroPad(seconds)]; minutes !== 0 && time.unshift(zeroPad(minutes)); @@ -19,16 +19,16 @@ const Renderer: React.FC = (props: TRenderer) => { {text} - + {time.join(':')} - + ); }; -export const Countdown: React.FC = (props: TCountdown) => { +export const Countdown = (props: TCountdown): JSX.Element => { const { timeout, text } = props; const then = timeout * 1000; return ( diff --git a/hyperglass/ui/components/debugger.tsx b/hyperglass/ui/components/debugger.tsx index 5218779..c4c91a8 100644 --- a/hyperglass/ui/components/debugger.tsx +++ b/hyperglass/ui/components/debugger.tsx @@ -23,7 +23,7 @@ interface TViewer extends Pick { children: React.ReactNode; } -const Viewer: React.FC = (props: TViewer) => { +const Viewer = (props: TViewer): JSX.Element => { const { title, isOpen, onClose, children } = props; const bg = useColorValue('white', 'blackSolid.700'); const color = useColorValue('black', 'white'); @@ -41,7 +41,7 @@ const Viewer: React.FC = (props: TViewer) => { ); }; -export const Debugger: React.FC = () => { +export const Debugger = (): JSX.Element => { const { isOpen: configOpen, onOpen: onConfigOpen, onClose: configClose } = useDisclosure(); const { isOpen: themeOpen, onOpen: onThemeOpen, onClose: themeClose } = useDisclosure(); const { colorMode } = useColorMode(); diff --git a/hyperglass/ui/components/footer/button.tsx b/hyperglass/ui/components/footer/button.tsx index a253e90..74c0cbb 100644 --- a/hyperglass/ui/components/footer/button.tsx +++ b/hyperglass/ui/components/footer/button.tsx @@ -20,7 +20,7 @@ function getConfigFmt(config: Config): Record { return fmt; } -export const FooterButton: React.FC = (props: TFooterButton) => { +export const FooterButton = (props: TFooterButton): JSX.Element => { const { content, title, side, ...rest } = props; const config = useConfig(); diff --git a/hyperglass/ui/components/footer/footer.tsx b/hyperglass/ui/components/footer/footer.tsx index 72de28b..f970390 100644 --- a/hyperglass/ui/components/footer/footer.tsx +++ b/hyperglass/ui/components/footer/footer.tsx @@ -22,7 +22,7 @@ function buildItems(links: Link[], menus: Menu[]): [(Link | Menu)[], (Link | Men return [left, right]; } -export const Footer: React.FC = () => { +export const Footer = (): JSX.Element => { const { web, content, primaryAsn } = useConfig(); const footerBg = useColorValue('blackAlpha.50', 'whiteAlpha.100'); diff --git a/hyperglass/ui/components/footer/link.tsx b/hyperglass/ui/components/footer/link.tsx index 83d34c0..5357d4e 100644 --- a/hyperglass/ui/components/footer/link.tsx +++ b/hyperglass/ui/components/footer/link.tsx @@ -2,7 +2,7 @@ import { Button, Link, useBreakpointValue } from '@chakra-ui/react'; import type { TFooterLink } from './types'; -export const FooterLink: React.FC = (props: TFooterLink) => { +export const FooterLink = (props: TFooterLink): JSX.Element => { const { title } = props; const btnSize = useBreakpointValue({ base: 'xs', lg: 'sm' }); return ( diff --git a/hyperglass/ui/components/form/field.tsx b/hyperglass/ui/components/form/field.tsx index 5dce75c..f68b18a 100644 --- a/hyperglass/ui/components/form/field.tsx +++ b/hyperglass/ui/components/form/field.tsx @@ -9,7 +9,7 @@ import type { FieldError } from 'react-hook-form'; import type { FormData } from '~/types'; import type { TField } from './types'; -export const FormField: React.FC = (props: TField) => { +export const FormField = (props: TField): JSX.Element => { const { name, label, children, labelAddOn, fieldAddOn, hiddenLabels = false, ...rest } = props; const labelColor = useColorValue('blackAlpha.700', 'whiteAlpha.700'); const errorColor = useColorValue('red.500', 'red.300'); diff --git a/hyperglass/ui/components/form/row.tsx b/hyperglass/ui/components/form/row.tsx index 5a0228b..3ad77bd 100644 --- a/hyperglass/ui/components/form/row.tsx +++ b/hyperglass/ui/components/form/row.tsx @@ -2,7 +2,7 @@ import { Flex } from '@chakra-ui/react'; import type { FlexProps } from '@chakra-ui/react'; -export const FormRow: React.FC = (props: FlexProps) => { +export const FormRow = (props: FlexProps): JSX.Element => { return ( = (props: THeader) => { +export const Header = (props: THeader): JSX.Element => { const { resetForm, ...rest } = props; const status = useFormState(s => s.status); diff --git a/hyperglass/ui/components/header/logo.tsx b/hyperglass/ui/components/header/logo.tsx index b044c2f..3bfa34b 100644 --- a/hyperglass/ui/components/header/logo.tsx +++ b/hyperglass/ui/components/header/logo.tsx @@ -31,7 +31,7 @@ function useLogo(): [string, () => void] { return useMemo(() => [fallback ?? src, setFallback], [fallback, setFallback, src]); } -export const Logo: React.FC = (props: TLogo) => { +export const Logo = (props: TLogo): JSX.Element => { const { web } = useConfig(); const { width } = web.logo; diff --git a/hyperglass/ui/components/header/subtitleOnly.tsx b/hyperglass/ui/components/header/subtitleOnly.tsx index 4f2d09f..a66bf5b 100644 --- a/hyperglass/ui/components/header/subtitleOnly.tsx +++ b/hyperglass/ui/components/header/subtitleOnly.tsx @@ -2,7 +2,7 @@ import { Heading } from '@chakra-ui/react'; import { useConfig, useBreakpointValue } from '~/context'; import { useTitleSize } from './useTitleSize'; -export const SubtitleOnly: React.FC = () => { +export const SubtitleOnly = (): JSX.Element => { const { web } = useConfig(); const sizeSm = useTitleSize(web.text.subtitle, 'sm'); const fontSize = useBreakpointValue({ base: sizeSm, lg: 'xl' }); diff --git a/hyperglass/ui/components/header/title.tsx b/hyperglass/ui/components/header/title.tsx index 944229c..bcd9dd8 100644 --- a/hyperglass/ui/components/header/title.tsx +++ b/hyperglass/ui/components/header/title.tsx @@ -15,7 +15,7 @@ const AnimatedVStack = motion(VStack); /** * Title wrapper for mobile devices, breakpoints sm & md. */ -const MWrapper: React.FC = (props: TMWrapper) => { +const MWrapper = (props: TMWrapper): JSX.Element => { const status = useFormState(s => s.status); return ( = (props: TMWrapper) => { /** * Title wrapper for desktop devices, breakpoints lg & xl. */ -const DWrapper: React.FC = (props: TDWrapper) => { +const DWrapper = (props: TDWrapper): JSX.Element => { const status = useFormState(s => s.status); return ( = (props: TDWrapper) => { * Universal wrapper for title sub-components, which will be different depending on the * `title_mode` configuration variable. */ -const TitleWrapper: React.FC = (props: TDWrapper | TMWrapper) => { +const TitleWrapper = (props: TDWrapper | TMWrapper): JSX.Element => { const isMobile = useMobile(); return ( <> @@ -61,7 +61,7 @@ const TitleWrapper: React.FC = (props: TDWrapper | TMWrap /** * Title sub-component if `title_mode` is set to `text_only`. */ -const TextOnly: React.FC = (props: TTitleWrapper) => { +const TextOnly = (props: TTitleWrapper): JSX.Element => { return ( @@ -73,7 +73,7 @@ const TextOnly: React.FC = (props: TTitleWrapper) => { /** * Title sub-component if `title_mode` is set to `logo_only`. Renders only the logo. */ -const LogoOnly: React.FC = () => ( +const LogoOnly = (): JSX.Element => ( @@ -83,7 +83,7 @@ const LogoOnly: React.FC = () => ( * Title sub-component if `title_mode` is set to `logo_subtitle`. Renders the logo with the * subtitle underneath. */ -const LogoSubtitle: React.FC = () => ( +const LogoSubtitle = (): JSX.Element => ( @@ -93,7 +93,7 @@ const LogoSubtitle: React.FC = () => ( /** * Title sub-component if `title_mode` is set to `all`. Renders the logo, title, and subtitle. */ -const All: React.FC = () => ( +const All = (): JSX.Element => ( @@ -103,7 +103,7 @@ const All: React.FC = () => ( /** * Title component which renders sub-components based on the `title_mode` configuration variable. */ -export const Title: React.FC = (props: TTitle) => { +export const Title = (props: TTitle): JSX.Element => { const { fontSize, ...rest } = props; const { web } = useConfig(); const { titleMode } = web.text; diff --git a/hyperglass/ui/components/header/titleOnly.tsx b/hyperglass/ui/components/header/titleOnly.tsx index 625ecd2..7957937 100644 --- a/hyperglass/ui/components/header/titleOnly.tsx +++ b/hyperglass/ui/components/header/titleOnly.tsx @@ -3,7 +3,7 @@ import { useConfig } from '~/context'; import { useBooleanValue, useFormState } from '~/hooks'; import { useTitleSize } from './useTitleSize'; -export const TitleOnly: React.FC = () => { +export const TitleOnly = (): JSX.Element => { const { web } = useConfig(); const status = useFormState(s => s.status); const margin = useBooleanValue(status === 'results', 0, 2); diff --git a/hyperglass/ui/components/help/modal.tsx b/hyperglass/ui/components/help/modal.tsx index 3d59bba..56c9fac 100644 --- a/hyperglass/ui/components/help/modal.tsx +++ b/hyperglass/ui/components/help/modal.tsx @@ -15,13 +15,13 @@ import { isQueryContent } from '~/types'; import type { THelpModal } from './types'; -export const HelpModal: React.FC = (props: THelpModal) => { +export const HelpModal = (props: THelpModal): JSX.Element => { const { visible, item, name, ...rest } = props; const { isOpen, onOpen, onClose } = useDisclosure(); const bg = useColorValue('whiteSolid.50', 'blackSolid.800'); const color = useColorValue('black', 'white'); if (!isQueryContent(item)) { - return null; + return <>; } return ( <> diff --git a/hyperglass/ui/components/markdown/elements.tsx b/hyperglass/ui/components/markdown/elements.tsx index f62a82a..7482541 100644 --- a/hyperglass/ui/components/markdown/elements.tsx +++ b/hyperglass/ui/components/markdown/elements.tsx @@ -54,12 +54,12 @@ function clean

(props: P): P { return props; } -export const Checkbox: React.FC = (props: TCheckbox & MDProps) => { +export const Checkbox = (props: TCheckbox & MDProps): JSX.Element => { const { checked, node, ...rest } = props; return ; }; -export const List: React.FC = (props: TList) => { +export const List = (props: TList): JSX.Element => { const { ordered, ...rest } = props; return ( <> @@ -73,7 +73,7 @@ export const List: React.FC = (props: TList) => { ); }; -export const ListItem: React.FC = (props: TListItem & MDProps) => { +export const ListItem = (props: TListItem & MDProps): JSX.Element => { const { checked, node, ...rest } = props; return checked ? ( @@ -82,7 +82,7 @@ export const ListItem: React.FC = (props: TListItem & MDPro ); }; -export const Heading: React.FC = (props: THeading) => { +export const Heading = (props: THeading): JSX.Element => { const { level, ...rest } = props; const levelMap = { @@ -97,16 +97,16 @@ export const Heading: React.FC = (props: THeading) => { return >(rest)} />; }; -export const Link: React.FC = (props: LinkProps) => { +export const Link = (props: LinkProps): JSX.Element => { const color = useColorValue('blue.500', 'blue.300'); return (props)} />; }; -export const CodeBlock: React.FC = (props: TCodeBlock) => ( +export const CodeBlock = (props: TCodeBlock): JSX.Element => ( {props.value} ); -export const Paragraph: React.FC = (props: TextProps) => ( +export const Paragraph = (props: TextProps): JSX.Element => ( = (props: TextProps) => ( /> ); -export const InlineCode: React.FC = (props: CodeProps) => ( +export const InlineCode = (props: CodeProps): JSX.Element => ( (props)} /> ); -export const Divider: React.FC = (props: DividerProps) => ( +export const Divider = (props: DividerProps): JSX.Element => ( (props)} /> ); -export const Table: React.FC = (props: TableProps) => ( +export const Table = (props: TableProps): JSX.Element => ( (props)} /> ); -export const TableRow: React.FC = (props: TableRowProps) => ( +export const TableRow = (props: TableRowProps): JSX.Element => ( (props)} /> ); -export const TableBody: React.FC = (props: TableBodyProps) => ( +export const TableBody = (props: TableBodyProps): JSX.Element => ( (props)} /> ); -export const TableHead: React.FC = (props: TableHeadProps) => ( +export const TableHead = (props: TableHeadProps): JSX.Element => ( (props)} /> ); -export const TableCell: React.FC = (props: TTableData) => { +export const TableCell = (props: TTableData): JSX.Element => { const { isHeader, ...rest } = props; return ( <> @@ -155,6 +155,6 @@ export const TableCell: React.FC = (props: TTableData) => { ); }; -export const Br: React.FC = (props: BoxProps) => ( +export const Br = (props: BoxProps): JSX.Element => ( (props)} /> ); diff --git a/hyperglass/ui/components/markdown/markdown.tsx b/hyperglass/ui/components/markdown/markdown.tsx index 8266d8b..0520944 100644 --- a/hyperglass/ui/components/markdown/markdown.tsx +++ b/hyperglass/ui/components/markdown/markdown.tsx @@ -37,6 +37,6 @@ const renderers = { thematicBreak: Divider, } as ReactMarkdownProps['renderers']; -export const Markdown: React.FC = (props: TMarkdown) => ( +export const Markdown = (props: TMarkdown): JSX.Element => ( ); diff --git a/hyperglass/ui/components/output/cell.tsx b/hyperglass/ui/components/output/cell.tsx index 7073f0d..c6a3e71 100644 --- a/hyperglass/ui/components/output/cell.tsx +++ b/hyperglass/ui/components/output/cell.tsx @@ -2,7 +2,7 @@ import { MonoField, Active, Weight, Age, Communities, RPKIState, ASPath } from ' import type { TCell } from './types'; -export const Cell: React.FC = (props: TCell) => { +export const Cell = (props: TCell): JSX.Element => { const { data, rawData } = props; const cellId = data.column.id as keyof Route; const component = { diff --git a/hyperglass/ui/components/output/fields.tsx b/hyperglass/ui/components/output/fields.tsx index 854295e..be87f3b 100644 --- a/hyperglass/ui/components/output/fields.tsx +++ b/hyperglass/ui/components/output/fields.tsx @@ -20,7 +20,7 @@ import type { dayjs.extend(relativeTimePlugin); dayjs.extend(utcPlugin); -export const MonoField: React.FC = (props: TMonoField) => { +export const MonoField = (props: TMonoField): JSX.Element => { const { v, ...rest } = props; return ( @@ -29,7 +29,7 @@ export const MonoField: React.FC = (props: TMonoField) => { ); }; -export const Active: React.FC = (props: TActive) => { +export const Active = (props: TActive): JSX.Element => { const { isActive } = props; const color = useColorValue(['gray.500', 'green.500'], ['whiteAlpha.300', 'blackAlpha.500']); return ( @@ -44,7 +44,7 @@ export const Active: React.FC = (props: TActive) => { ); }; -export const Age: React.FC = (props: TAge) => { +export const Age = (props: TAge): JSX.Element => { const { inSeconds, ...rest } = props; const now = dayjs.utc(); const then = now.subtract(inSeconds, 'second'); @@ -57,7 +57,7 @@ export const Age: React.FC = (props: TAge) => { ); }; -export const Weight: React.FC = (props: TWeight) => { +export const Weight = (props: TWeight): JSX.Element => { const { weight, winningWeight, ...rest } = props; const fixMeText = winningWeight === 'low' ? 'Lower Weight is Preferred' : 'Higher Weight is Preferred'; @@ -70,7 +70,7 @@ export const Weight: React.FC = (props: TWeight) => { ); }; -export const ASPath: React.FC = (props: TASPath) => { +export const ASPath = (props: TASPath): JSX.Element => { const { path, active } = props; const color = useColorValue( // light: inactive, active @@ -107,7 +107,7 @@ export const ASPath: React.FC = (props: TASPath) => { return <>{paths}; }; -export const Communities: React.FC = (props: TCommunities) => { +export const Communities = (props: TCommunities): JSX.Element => { const { communities } = props; const { web } = useConfig(); const bg = useColorValue('white', 'gray.900'); diff --git a/hyperglass/ui/components/output/table.tsx b/hyperglass/ui/components/output/table.tsx index 7fd7748..aa22660 100644 --- a/hyperglass/ui/components/output/table.tsx +++ b/hyperglass/ui/components/output/table.tsx @@ -1,6 +1,6 @@ import { Flex } from '@chakra-ui/react'; -import { useConfig } from '~/context'; import { Table } from '~/components'; +import { useConfig } from '~/context'; import { Cell } from './cell'; import type { TColumn, ParsedDataField, TCellRender } from '~/types'; @@ -25,7 +25,7 @@ function makeColumns(fields: ParsedDataField[]): TColumn[] { }); } -export const BGPTable: React.FC = (props: TBGPTable) => { +export const BGPTable = (props: TBGPTable): JSX.Element => { const { children: data, ...rest } = props; const { parsedDataFields } = useConfig(); const columns = makeColumns(parsedDataFields); diff --git a/hyperglass/ui/components/output/text.tsx b/hyperglass/ui/components/output/text.tsx index 976bd17..5043bd1 100644 --- a/hyperglass/ui/components/output/text.tsx +++ b/hyperglass/ui/components/output/text.tsx @@ -4,7 +4,7 @@ import { Highlighted } from './highlighted'; import type { TTextOutput } from './types'; -export const TextOutput: React.FC = (props: TTextOutput) => { +export const TextOutput = (props: TTextOutput): JSX.Element => { const { children, ...rest } = props; const bg = useColorValue('blackAlpha.100', 'gray.800'); diff --git a/hyperglass/ui/components/path/chart.tsx b/hyperglass/ui/components/path/chart.tsx index 46409e8..a0c2a30 100644 --- a/hyperglass/ui/components/path/chart.tsx +++ b/hyperglass/ui/components/path/chart.tsx @@ -7,7 +7,7 @@ import { useElements } from './useElements'; import type { TChart, TNode, TNodeData } from './types'; -export const Chart: React.FC = (props: TChart) => { +export const Chart = (props: TChart): JSX.Element => { const { data } = props; const { primaryAsn, orgName } = useConfig(); @@ -32,7 +32,7 @@ export const Chart: React.FC = (props: TChart) => { ); }; -const ASNode: React.FC> = (props: TNode) => { +const ASNode = (props: TNode): JSX.Element => { const { data } = props; const { asn, name, hasChildren, hasParents } = data; diff --git a/hyperglass/ui/components/path/controls.tsx b/hyperglass/ui/components/path/controls.tsx index 0d002c6..d6e1f6c 100644 --- a/hyperglass/ui/components/path/controls.tsx +++ b/hyperglass/ui/components/path/controls.tsx @@ -2,7 +2,7 @@ import { ButtonGroup, IconButton } from '@chakra-ui/react'; import { useZoomPanHelper } from 'react-flow-renderer'; import { DynamicIcon } from '~/components'; -export const Controls: React.FC = () => { +export const Controls = (): JSX.Element => { const { fitView, zoomIn, zoomOut } = useZoomPanHelper(); return ( = (props: TPath) => { +export const Path = (props: TPath): JSX.Element => { const { device } = props; const displayTarget = useFormState(s => s.target.display); const getResponse = useFormState(s => s.response); diff --git a/hyperglass/ui/components/results/error.tsx b/hyperglass/ui/components/results/error.tsx index a8292d3..5e3f102 100644 --- a/hyperglass/ui/components/results/error.tsx +++ b/hyperglass/ui/components/results/error.tsx @@ -22,7 +22,7 @@ function formatError(text: string, values: string[], regex: RegExp): TFormatErro }, [] as TFormatError[]); } -export const FormattedError: React.FC = (props: TFormattedError) => { +export const FormattedError = (props: TFormattedError): JSX.Element => { const { keywords, message } = props; const pattern = new RegExp(keywords.map(kw => `(${kw})`).join('|'), 'gi'); const things = formatError(message, keywords, pattern); diff --git a/hyperglass/ui/components/results/group.tsx b/hyperglass/ui/components/results/group.tsx index 105cc3b..a11dbb6 100644 --- a/hyperglass/ui/components/results/group.tsx +++ b/hyperglass/ui/components/results/group.tsx @@ -6,7 +6,7 @@ import { useFormState } from '~/hooks'; import { Result } from './individual'; import { Tags } from './tags'; -export const Results: React.FC = () => { +export const Results = (): JSX.Element => { const { queryLocation } = useFormState(s => s.form); // Scroll to the top of the page when results load - primarily for mobile. diff --git a/hyperglass/ui/components/results/header.tsx b/hyperglass/ui/components/results/header.tsx index fbe8dae..90b3eb8 100644 --- a/hyperglass/ui/components/results/header.tsx +++ b/hyperglass/ui/components/results/header.tsx @@ -14,7 +14,7 @@ const runtimeText = (runtime: number, text: string): string => { return `${text} ${unit}`; }; -export const ResultHeader: React.FC = (props: TResultHeader) => { +export const ResultHeader = (props: TResultHeader): JSX.Element => { const { title, loading, isError, errorMsg, errorLevel, runtime } = props; const status = useColorValue('primary.500', 'primary.300'); diff --git a/hyperglass/ui/components/results/tags.tsx b/hyperglass/ui/components/results/tags.tsx index 7e14416..b4c04b7 100644 --- a/hyperglass/ui/components/results/tags.tsx +++ b/hyperglass/ui/components/results/tags.tsx @@ -9,7 +9,7 @@ import type { Transition } from 'framer-motion'; const transition = { duration: 0.3, delay: 0.5 } as Transition; -export const Tags: React.FC = () => { +export const Tags = (): JSX.Element => { const { web } = useConfig(); const form = useFormState(s => s.form); const getDirective = useFormState(s => s.getDirective); @@ -29,13 +29,6 @@ export const Tags: React.FC = () => { xl: { opacity: 1, x: 0 }, }); - // const animateCenter = useBreakpointValue({ - // base: { opacity: 1 }, - // md: { opacity: 1 }, - // lg: { opacity: 1 }, - // xl: { opacity: 1 }, - // }); - const animateRight = useBreakpointValue({ base: { opacity: 1, x: 0 }, md: { opacity: 1, x: 0 }, @@ -50,13 +43,6 @@ export const Tags: React.FC = () => { xl: { opacity: 0, x: '-100%' }, }); - // const initialCenter = useBreakpointValue({ - // base: { opacity: 0 }, - // md: { opacity: 0 }, - // lg: { opacity: 0 }, - // xl: { opacity: 0 }, - // }); - const initialRight = useBreakpointValue({ base: { opacity: 0, x: '100%' }, md: { opacity: 0, x: '100%' }, diff --git a/hyperglass/ui/components/table/body.tsx b/hyperglass/ui/components/table/body.tsx index 2d62a4f..0f77a7d 100644 --- a/hyperglass/ui/components/table/body.tsx +++ b/hyperglass/ui/components/table/body.tsx @@ -1,10 +1,9 @@ -import { Box } from '@chakra-ui/react'; +import { chakra } from '@chakra-ui/react'; import type { BoxProps } from '@chakra-ui/react'; -export const TableBody: React.FC = (props: BoxProps) => ( - ( + = (props: TTableIconButton) => ( +export const TableIconButton = (props: TTableIconButton): JSX.Element => ( ); diff --git a/hyperglass/ui/components/table/cell.tsx b/hyperglass/ui/components/table/cell.tsx index 618d094..f0f6778 100644 --- a/hyperglass/ui/components/table/cell.tsx +++ b/hyperglass/ui/components/table/cell.tsx @@ -1,9 +1,9 @@ -import { Box } from '@chakra-ui/react'; +import { chakra } from '@chakra-ui/react'; import { useColorValue } from '~/context'; import type { TTableCell } from './types'; -export const TableCell: React.FC = (props: TTableCell) => { +export const TableCell = (props: TTableCell): JSX.Element => { const { bordersVertical = [false, 0], align, ...rest } = props; const [doVerticalBorders, index] = bordersVertical; const borderLeftColor = useColorValue('blackAlpha.100', 'whiteAlpha.100'); @@ -14,11 +14,10 @@ export const TableCell: React.FC = (props: TTableCell) => { } return ( - = (props: BoxProps) => { +export const TableHead = (props: BoxProps): JSX.Element => { const bg = useColorValue('blackAlpha.100', 'whiteAlpha.100'); - return ; + return ; }; diff --git a/hyperglass/ui/components/table/main.tsx b/hyperglass/ui/components/table/main.tsx index 461dfa7..cafdd0e 100644 --- a/hyperglass/ui/components/table/main.tsx +++ b/hyperglass/ui/components/table/main.tsx @@ -16,7 +16,7 @@ import type { TableOptions, PluginHook } from 'react-table'; import type { TCellRender } from '~/types'; import type { TTable } from './types'; -export const Table: React.FC = (props: TTable) => { +export const Table = (props: TTable): JSX.Element => { const { data, columns, diff --git a/hyperglass/ui/components/table/pageSelect.tsx b/hyperglass/ui/components/table/pageSelect.tsx index e4fb4ff..8e17b95 100644 --- a/hyperglass/ui/components/table/pageSelect.tsx +++ b/hyperglass/ui/components/table/pageSelect.tsx @@ -2,7 +2,7 @@ import { Select } from '@chakra-ui/react'; import type { SelectProps } from '@chakra-ui/react'; -export const TableSelectShow: React.FC = (props: SelectProps) => { +export const TableSelectShow = (props: SelectProps): JSX.Element => { const { value, ...rest } = props; return (