Skip to content

Commit

Permalink
AI Proofread: Use Button and set extension as true on tables
Browse files Browse the repository at this point in the history
  • Loading branch information
renatoagds committed Jul 16, 2024
1 parent 60619bb commit be625c5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default function Highlight() {

const handleApplySuggestion = () => {
// Apply known fixes
const render = fixes.table( fixes.listItem( suggestions?.html, true ) );
const render = fixes.table( fixes.listItem( suggestions?.html, true ), true );
const [ newBlock ] = rawHandler( { HTML: render } );
updateBlockAttributes( block, newBlock.attributes );
};
Expand Down Expand Up @@ -126,9 +126,9 @@ export default function Highlight() {
</div>
{ hasSuggestions ? (
<div className="suggestion-container">
<button className="suggestion" onClick={ handleApplySuggestion }>
<Button variant="tertiary" onClick={ handleApplySuggestion }>
{ suggestions?.suggestion }
</button>
</Button>
<div className="helper">
{ __( 'Click on a suggestion to insert it.', 'jetpack' ) }
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,16 @@
flex-direction: column;
border-top: 1px solid #dcdcde;

.suggestion {
padding: 14px 8px;
cursor: pointer;
&:hover {
background-color: #dcdcde;
}
}

.helper {
padding: 8px;
background-color: #f6f7f7;
white-space: nowrap;
color: #646970;
}

.components-button.is-tertiary {
color: #000000;
}
}
}
}

0 comments on commit be625c5

Please sign in to comment.