Skip to content

Commit

Permalink
remove clear button
Browse files Browse the repository at this point in the history
  • Loading branch information
CGastrell committed Dec 18, 2023
1 parent 8aa8164 commit a1d8824
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 26 deletions.
10 changes: 0 additions & 10 deletions projects/js-packages/ai-client/src/components/ai-control/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ type AIControlProps = {
showButtonLabels?: boolean;
isTransparent?: boolean;
state?: RequestingStateProp;
showClearButton?: boolean;
showGuideLine?: boolean;
onChange?: ( newValue: string ) => void;
onSend?: ( currentValue: string ) => void;
Expand Down Expand Up @@ -56,7 +55,6 @@ export function AIControl(
showButtonLabels = true,
isTransparent = false,
state = 'init',
showClearButton = true,
showGuideLine = false,
onChange = noop,
onSend = noop,
Expand Down Expand Up @@ -129,14 +127,6 @@ export function AIControl(
/>
</div>

{ value?.length > 0 && showClearButton && ! loading && (
<Button
icon={ closeSmall }
className="jetpack-components-ai-control__clear"
onClick={ () => onChange( '' ) }
/>
) }

{ ! showAccept && value?.length > 0 && (
<div className="jetpack-components-ai-control__controls-prompt_button_wrapper">
{ ! loading ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,6 @@
}
}

.jetpack-components-ai-control__clear.components-button.has-icon {
width: 24px;
min-width: 24px;
height: 24px;
padding: 0;
border-radius: 50%;
background-color: black;
opacity: 0.2;
color: white;

&:hover {
opacity: 0.4;
}
}

.jetpack-components-ai-control__controls-prompt_button {
&:disabled {
opacity: 0.6;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,6 @@ export default function AIAssistantEdit( { attributes, setAttributes, clientId,
showButtonLabels={ ! isMobileViewport }
showAccept={ contentIsLoaded && ! isWaitingState }
acceptLabel={ acceptLabel }
showClearButton={ false }
showGuideLine={ contentIsLoaded }
/>

Expand Down

0 comments on commit a1d8824

Please sign in to comment.