From c0a47271147486fed147756297ceadcadfce209c Mon Sep 17 00:00:00 2001 From: Chaim Lev-Ari Date: Mon, 22 Nov 2021 18:13:40 +0200 Subject: [PATCH] feat(app): introduce input list component [EE-2003] (#6123) --- app/assets/css/index.js | 6 +- app/portainer/components/Button/AddButton.tsx | 4 +- .../form-components/Input/BaseInput.tsx | 2 +- .../form-components/Input/Select.tsx | 4 +- .../form-components/Input/TextInput.tsx | 3 +- .../InputList/InputList.module.css | 30 +++ .../InputList/InputList.stories.tsx | 90 +++++++++ .../form-components/InputList/InputList.tsx | 183 ++++++++++++++++++ .../form-components/InputList/index.ts | 1 + .../form-components/InputList/utils.test.ts | 23 +++ .../form-components/InputList/utils.ts | 37 ++++ yarn.lock | 2 +- 12 files changed, 376 insertions(+), 9 deletions(-) create mode 100644 app/portainer/components/form-components/InputList/InputList.module.css create mode 100644 app/portainer/components/form-components/InputList/InputList.stories.tsx create mode 100644 app/portainer/components/form-components/InputList/InputList.tsx create mode 100644 app/portainer/components/form-components/InputList/index.ts create mode 100644 app/portainer/components/form-components/InputList/utils.test.ts create mode 100644 app/portainer/components/form-components/InputList/utils.ts diff --git a/app/assets/css/index.js b/app/assets/css/index.js index e4a01560b..c48ded8c2 100644 --- a/app/assets/css/index.js +++ b/app/assets/css/index.js @@ -1,6 +1,3 @@ -import './rdash.css'; -import './app.css'; - import 'ui-select/dist/select.css'; import 'bootstrap/dist/css/bootstrap.css'; import '@fortawesome/fontawesome-free/css/brands.css'; @@ -17,5 +14,8 @@ import 'angular-moment-picker/dist/angular-moment-picker.min.css'; import 'angular-multiselect/isteven-multi-select.css'; import 'spinkit/spinkit.min.css'; +import './rdash.css'; +import './app.css'; + import './theme.css'; import './vendor-override.css'; diff --git a/app/portainer/components/Button/AddButton.tsx b/app/portainer/components/Button/AddButton.tsx index e95718ddc..2f97159a6 100644 --- a/app/portainer/components/Button/AddButton.tsx +++ b/app/portainer/components/Button/AddButton.tsx @@ -3,14 +3,16 @@ import clsx from 'clsx'; import styles from './AddButton.module.css'; export interface Props { + className?: string; label: string; onClick: () => void; } -export function AddButton({ label, onClick }: Props) { +export function AddButton({ label, onClick, className }: Props) { return (