From c527559a5d7b1d68e70fc006dc8743d195e2e494 Mon Sep 17 00:00:00 2001 From: Katie George Date: Thu, 31 Oct 2024 14:17:20 -0700 Subject: [PATCH] fix: Makes paddings equal on all sides in prompt input (#2958) Co-authored-by: Katie George --- pages/prompt-input/simple.page.tsx | 30 ++++++++++++++++-------------- src/prompt-input/styles.scss | 4 ++-- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/pages/prompt-input/simple.page.tsx b/pages/prompt-input/simple.page.tsx index b9b1ce646d..f9d2692166 100644 --- a/pages/prompt-input/simple.page.tsx +++ b/pages/prompt-input/simple.page.tsx @@ -2,13 +2,18 @@ // SPDX-License-Identifier: Apache-2.0 import React, { useContext, useEffect, useState } from 'react'; -import { AppLayout, Box, SplitPanel, TokenGroup } from '~components'; -import ButtonGroup from '~components/button-group'; -import Checkbox from '~components/checkbox'; -import ColumnLayout from '~components/column-layout'; -import FormField from '~components/form-field'; -import PromptInput from '~components/prompt-input'; -import SpaceBetween from '~components/space-between'; +import { + Alert, + AppLayout, + Box, + ButtonGroup, + Checkbox, + ColumnLayout, + FormField, + PromptInput, + SpaceBetween, + SplitPanel, +} from '~components'; import AppContext, { AppContextType } from '../app/app-context'; import labels from '../app-layout/utils/labels'; @@ -188,13 +193,10 @@ export default function PromptInputPage() { } secondaryContent={ hasSecondaryContent ? ( - { - setItems([...items.slice(0, itemIndex), ...items.slice(itemIndex + 1)]); - }} - items={items} - readOnly={isReadOnly} - /> + + Review the documentation to learn about potential compatibility issues with specific database + versions. + ) : undefined } /> diff --git a/src/prompt-input/styles.scss b/src/prompt-input/styles.scss index 5a6bd33059..b8b11b855d 100644 --- a/src/prompt-input/styles.scss +++ b/src/prompt-input/styles.scss @@ -161,10 +161,10 @@ $invalid-border-offset: constants.$invalid-control-left-padding; @include styles.control-border-radius-full(); &.with-paddings { - padding-block-start: styles.$control-padding-vertical; + padding-block-start: awsui.$space-scaled-s; padding-block-end: awsui.$space-scaled-s; padding-inline-start: styles.$control-padding-horizontal; - padding-inline-end: calc(styles.$control-padding-horizontal / 2); + padding-inline-end: styles.$control-padding-horizontal; &.invalid, &.warning {