From 3566ff2d35cd5be26ab1d2c551d9b25cfaa24aaf Mon Sep 17 00:00:00 2001
From: Paul Wackerow <54227730+wackerow@users.noreply.github.com>
Date: Fri, 20 Sep 2024 16:27:35 -0700
Subject: [PATCH] deprecate: rm unused Input component
---
src/components/Input/Input.stories.tsx | 43 ------------------------
src/components/Input/index.tsx | 45 --------------------------
2 files changed, 88 deletions(-)
delete mode 100644 src/components/Input/Input.stories.tsx
delete mode 100644 src/components/Input/index.tsx
diff --git a/src/components/Input/Input.stories.tsx b/src/components/Input/Input.stories.tsx
deleted file mode 100644
index 74fb88a0336..00000000000
--- a/src/components/Input/Input.stories.tsx
+++ /dev/null
@@ -1,43 +0,0 @@
-import * as React from "react"
-import { BsSlashSquare } from "react-icons/bs"
-import { VStack } from "@chakra-ui/react"
-import { Meta, StoryObj } from "@storybook/react"
-
-import Input from "."
-
-const meta = {
- title: "Atoms / Form / Input",
- component: Input,
- args: {
- rightIcon: ,
- },
-} satisfies Meta
-
-export default meta
-
-type Story = StoryObj
-
-export const Sizes: Story = {
- args: {
- placeholder: "Search",
- },
- render: (args) => (
-
-
-
-
- ),
-}
-
-export const ElementVariations: Story = {
- args: {
- placeholder: "input text",
- },
- render: (args) => (
-
-
-
-
-
- ),
-}
diff --git a/src/components/Input/index.tsx b/src/components/Input/index.tsx
deleted file mode 100644
index e84f31f29ec..00000000000
--- a/src/components/Input/index.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-import * as React from "react"
-import {
- Input as ChakraInput,
- InputGroup,
- InputGroupProps,
- InputProps as ChakraInputProps,
- InputRightElement,
-} from "@chakra-ui/react"
-
-type CommonProps = ChakraInputProps
-
-type NoIconProps = CommonProps & { rightIcon?: never }
-
-type WithIconProps = CommonProps & {
- /**
- * The Icon used to render `InputRightElement` on the right side of the input
- */
- rightIcon: JSX.Element
- /**
- * Primarily for style props to be applied to the wrapper
- */
- inputGroupProps?: InputGroupProps
-}
-
-type InputProps = NoIconProps | WithIconProps
-
-function Input(props: NoIconProps): JSX.Element
-function Input(props: WithIconProps): JSX.Element
-function Input(props: InputProps) {
- if (props.rightIcon) {
- const { size, inputGroupProps, rightIcon: Icon, ...rest } = props
- return (
-
-
- {Icon}
-
- )
- }
-
- const { size, ...rest } = props
-
- return
-}
-
-export default Input