Skip to content

Commit

Permalink
Update Card.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
Sasank123k authored Jun 20, 2024
1 parent 0cc807a commit cf6a1cf
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/components/Card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,14 @@ const CardSection: React.FC = () => {
{showCss[index] ? 'CSS' : 'TSX'}
</button>
</div>
<div className={styles.codeBlock}>
<pre>
<code>{showCss[index] ? cardCss : cardTsxString(card)}</code>
</pre>
<button onClick={() => copyToClipboard(showCss[index] ? cardCss : cardTsxString(card))}>Copy {showCss[index] ? 'CSS' : 'TSX'}</button>
</div>
{showCss[index] && (
<div className={styles.codeBlock}>
<pre>
<code>{showCss[index] ? cardCss : cardTsxString(card)}</code>
</pre>
<button onClick={() => copyToClipboard(showCss[index] ? cardCss : cardTsxString(card))}>Copy {showCss[index] ? 'CSS' : 'TSX'}</button>
</div>
)}
</div>
))}
</div>
Expand Down

0 comments on commit cf6a1cf

Please sign in to comment.