Skip to content

Commit

Permalink
fix: Makes paddings equal on all sides in prompt input (#2958)
Browse files Browse the repository at this point in the history
Co-authored-by: Katie George <[email protected]>
  • Loading branch information
katiegeorge and Katie George authored Oct 31, 2024
1 parent 02a8ba3 commit c527559
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
30 changes: 16 additions & 14 deletions pages/prompt-input/simple.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -188,13 +193,10 @@ export default function PromptInputPage() {
}
secondaryContent={
hasSecondaryContent ? (
<TokenGroup
onDismiss={({ detail: { itemIndex } }) => {
setItems([...items.slice(0, itemIndex), ...items.slice(itemIndex + 1)]);
}}
items={items}
readOnly={isReadOnly}
/>
<Alert statusIconAriaLabel="Info" header="Known issues/limitations">
Review the documentation to learn about potential compatibility issues with specific database
versions.
</Alert>
) : undefined
}
/>
Expand Down
4 changes: 2 additions & 2 deletions src/prompt-input/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c527559

Please sign in to comment.