From e227c35e83d75ca5fa463d1e195d3f5627695bfa Mon Sep 17 00:00:00 2001 From: Jake Laderman Date: Mon, 5 Aug 2024 21:08:36 -0400 Subject: [PATCH] feat: add flux icon (#630) --- src/components/TabList.tsx | 6 ++- src/components/icons/FluxIcon.tsx | 62 +++++++++++++++++++++++++++++++ src/icons.ts | 1 + src/types.ts | 2 + 4 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 src/components/icons/FluxIcon.tsx diff --git a/src/components/TabList.tsx b/src/components/TabList.tsx index bb302ef80..01db948f8 100644 --- a/src/components/TabList.tsx +++ b/src/components/TabList.tsx @@ -22,6 +22,8 @@ import { } from 'react' import styled, { useTheme } from 'styled-components' +import { type Nullable } from '../types' + import { useItemWrappedChildren } from './ListBox' import ArrowScroll from './ArrowScroll' import WrapWithIf from './WrapWithIf' @@ -55,7 +57,9 @@ export type TabStateRef = MutableRefObject<{ updateTabPanel: () => any }> -type ChildrenType = ReactElement | ReactElement[] +type ChildrenType = + | Nullable> + | Nullable>[] type TabListProps = { stateRef: TabStateRef diff --git a/src/components/icons/FluxIcon.tsx b/src/components/icons/FluxIcon.tsx new file mode 100644 index 000000000..2c18e234f --- /dev/null +++ b/src/components/icons/FluxIcon.tsx @@ -0,0 +1,62 @@ +import createIcon from './createIcon' + +export default createIcon(({ size, color, secondaryColor, fullColor }) => ( + + + + + + + + + +)) diff --git a/src/icons.ts b/src/icons.ts index c996abfd5..9eade0c28 100644 --- a/src/icons.ts +++ b/src/icons.ts @@ -80,6 +80,7 @@ export { default as FastReverseIcon } from './components/icons/FastReverseIcon' export { default as FileIcon } from './components/icons/FileIcon' export { default as FiltersIcon } from './components/icons/FiltersIcon' export { default as FingerPrintIcon } from './components/icons/FingerPrintIcon' +export { default as FluxIcon } from './components/icons/FluxIcon' export { default as FolderIcon } from './components/icons/FolderIcon' export { default as GearTrainIcon } from './components/icons/GearTrainIcon' export { default as GitCommitIcon } from './components/icons/GitCommitIcon' diff --git a/src/types.ts b/src/types.ts index bd1a00c30..3a837c06b 100644 --- a/src/types.ts +++ b/src/types.ts @@ -57,3 +57,5 @@ export type SeverityExt = (typeof SEVERITIES)[number] export type ColorKey = keyof DefaultTheme['colors'] export { type CSSObject } from 'styled-components' + +export type Nullable = T | null | undefined