Skip to content

Commit

Permalink
feat: created a new code tag to reduce repeated code (#413)
Browse files Browse the repository at this point in the history
<!-- 馃憢 Hi, thanks for sending a PR to emoji-blast! 馃挅.
Please fill out all fields below and make sure each item is true and [x]
checked.
Otherwise we may not be able to review your PR. -->

## PR Checklist

- [x] Addresses an existing open issue: fixes #291 
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/emoji-blast/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/emoji-blast/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

1. Added a new code tag in components
2. Replaced the code tag in doc-content.tsx
  • Loading branch information
JoshuaKGoldberg committed Jun 11, 2024
2 parents 8a8338b + 04f4896 commit 75c6974
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 117 deletions.
10 changes: 10 additions & 0 deletions packages/emoji-blast-site/src/components/code-tag/code-tag.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import * as usageStyles from "../usage-container/styles";

interface CodeTagProps {
children: React.ReactNode;
style?: React.CSSProperties;
}

export function CodeTag({ children, style }: CodeTagProps) {
return <code css={{ ...usageStyles.code, ...style }}>{children}</code>;
}
Loading

0 comments on commit 75c6974

Please sign in to comment.