From fbe7a9c1730761523aa24b1874391a7d60386309 Mon Sep 17 00:00:00 2001 From: Mehmet Salih Yavuz Date: Mon, 28 Oct 2024 15:32:36 +0300 Subject: [PATCH 1/7] refactor(input): Migrate Input component to Ant Design 5 --- .../src/components/Input/Input.stories.tsx | 138 ++++++++++++++++++ .../src/components/Input/Input.test.tsx | 35 +++++ .../src/components/Input/index.tsx | 19 +-- superset-frontend/src/theme/index.ts | 14 ++ 4 files changed, 192 insertions(+), 14 deletions(-) create mode 100644 superset-frontend/src/components/Input/Input.stories.tsx create mode 100644 superset-frontend/src/components/Input/Input.test.tsx diff --git a/superset-frontend/src/components/Input/Input.stories.tsx b/superset-frontend/src/components/Input/Input.stories.tsx new file mode 100644 index 0000000000000..4023c53d97e0f --- /dev/null +++ b/superset-frontend/src/components/Input/Input.stories.tsx @@ -0,0 +1,138 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { InputProps, TextAreaProps } from 'antd-v5/lib/input'; +import { InputNumberProps } from 'antd-v5/lib/input-number'; +import { AntdThemeProvider } from 'src/components/AntdThemeProvider'; +import { Input, TextArea, InputNumber } from '.'; + +export default { + title: 'Input', + component: Input, +}; + +export const InteractiveInput = (args: InputProps) => ( + + + +); + +export const InteractiveInputNumber = (args: InputNumberProps) => ( + + + +); + +export const InteractiveTextArea = (args: TextAreaProps) => ( + +