Skip to content

Commit

Permalink
nit: Updated markdown expand icon (#20739)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeeklop authored Oct 18, 2024
1 parent f18221c commit 83511bf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@ type Props = {
noBorder?: boolean;
};

function Preview({ value, height, show, withFullView = false, noBackground = false, noBorder = false }: Props) {
function Preview({ value, height = 100, show, withFullView = false, noBackground = false, noBorder = false }: Props) {
const [fullView, setFullView] = React.useState<boolean>(false);

return show && (
<Container $height={height} $noBackground={noBackground} $noBorder={noBorder}>
<MarkdownStyles>
<Markdown text={value} />
</MarkdownStyles>
{withFullView && <ExpandIcon name="expand" onClick={() => setFullView(true)} />}
{withFullView && <ExpandIcon name="expand_content" size="sm" onClick={() => setFullView(true)} />}
<PreviewModal value={value} show={fullView} onClose={() => setFullView(false)} />
</Container>
);
Expand Down

0 comments on commit 83511bf

Please sign in to comment.