From dc3fc093d30edadd48263c558b5c8bcae24b1557 Mon Sep 17 00:00:00 2001 From: Samad Yar Khan Date: Sun, 10 Jul 2022 23:16:03 +0000 Subject: [PATCH 1/2] Add MultilineMedium and MultilineLarge Blok elements to the UIKit --- .../src/elements/PlainTextInputElement.tsx | 40 ++++++++++++++++++- .../src/stories/Banner.stories.tsx | 14 +++++++ .../src/stories/Modal.stories.tsx | 14 +++++++ .../src/stories/payloads/input.ts | 38 ++++++++++++++++++ .../blocks/elements/PlainTextInputElement.ts | 3 ++ 5 files changed, 108 insertions(+), 1 deletion(-) diff --git a/packages/fuselage-ui-kit/src/elements/PlainTextInputElement.tsx b/packages/fuselage-ui-kit/src/elements/PlainTextInputElement.tsx index 7394b605ed..2388f15492 100644 --- a/packages/fuselage-ui-kit/src/elements/PlainTextInputElement.tsx +++ b/packages/fuselage-ui-kit/src/elements/PlainTextInputElement.tsx @@ -16,7 +16,45 @@ const PlainTextInputElement = ({ }: PlainTextInputElementProps): ReactElement => { const [{ loading, value, error }, action] = useUiKitState(block, context); - if (block.multiline) { + if (block.multilineLarge) { + return ( + + ); + } + + if (block.multilineMedium) { + return ( + + ); + } + + if (block.multiline || block.multilineSmall) { return ( ; From 674e67d7bbea485358e0aa78f8e0263e4a66da2d Mon Sep 17 00:00:00 2001 From: Samad Yar Khan Date: Sun, 31 Jul 2022 17:28:44 +0000 Subject: [PATCH 2/2] Update PlainTextInputElement parameters --- .../fuselage-ui-kit/src/elements/PlainTextInputElement.tsx | 6 +++--- packages/fuselage-ui-kit/src/stories/payloads/input.ts | 7 +++++-- .../ui-kit/src/blocks/elements/PlainTextInputElement.ts | 4 +--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/fuselage-ui-kit/src/elements/PlainTextInputElement.tsx b/packages/fuselage-ui-kit/src/elements/PlainTextInputElement.tsx index 2388f15492..e3e4fbf68c 100644 --- a/packages/fuselage-ui-kit/src/elements/PlainTextInputElement.tsx +++ b/packages/fuselage-ui-kit/src/elements/PlainTextInputElement.tsx @@ -16,7 +16,7 @@ const PlainTextInputElement = ({ }: PlainTextInputElementProps): ReactElement => { const [{ loading, value, error }, action] = useUiKitState(block, context); - if (block.multilineLarge) { + if (block.multiline && block.multilineSize === 'large') { return ( ;