Skip to content

Commit

Permalink
Rename AngledContainer to Panel
Browse files Browse the repository at this point in the history
  • Loading branch information
MartijnHols committed Dec 11, 2024
1 parent b239c57 commit 18c1e9a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions components/CodeSnippet.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { css, useTheme } from '@emotion/react'
import styled from '@emotion/styled'
import { Highlight, themes } from 'prism-react-renderer'
import AngledContainer from './AngledContainer'
import CopyPasteOnly from './CopyPasteOnly'
import Panel from './Panel'
// Alternative: https://github.com/react-simple-code-editor/react-simple-code-editor

const Code = styled.code`
Expand Down Expand Up @@ -61,7 +61,7 @@ const CodeSnippet = ({
<br />
</CopyPasteOnly>
<Code translate="no" {...others}>
<AngledContainer variant={variant}>
<Panel variant={variant}>
<Highlight
theme={highlightTheme}
code={children.trim()}
Expand All @@ -79,7 +79,7 @@ const CodeSnippet = ({
</PreformattedContainer>
)}
</Highlight>
</AngledContainer>
</Panel>
</Code>
<CopyPasteOnly>
```
Expand Down
4 changes: 2 additions & 2 deletions components/GistCard.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { css } from '@emotion/react'
import styled from '@emotion/styled'
import AngledContainer from './AngledContainer'
import { GistTag, SerializableGistMeta } from './GistMeta'
import Link from './Link'
import Panel from './Panel'
import PublicationDate from './PublicationDate'
import Tag from './Tag'

Expand Down Expand Up @@ -65,7 +65,7 @@ const ArticleLink = styled(Link, {
max-width: 90%;
`,
])
const Article = styled(AngledContainer, {
const Article = styled(Panel, {
shouldForwardProp: (prop) => prop !== 'howTo',
})<{ howTo?: boolean }>(({ theme, howTo }) => [
css`
Expand Down
4 changes: 2 additions & 2 deletions components/AngledContainer.tsx → components/Panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ interface Props {
className?: string
}

const AngledContainer = ({
const Panel = ({
children,
variant = 'md',
boxShadow = true,
Expand All @@ -135,4 +135,4 @@ const AngledContainer = ({
</Container>
)

export default AngledContainer
export default Panel
4 changes: 2 additions & 2 deletions components/ProjectBrief.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import Image from 'next/image'
import { Fragment, ReactNode } from 'react'
import { ImageInfo } from '../utils/convertPrismicImage'
import { usePrismicConfig } from '../utils/prismicConfig'
import AngledContainer from './AngledContainer'
import CopyPasteOnly from './CopyPasteOnly'
import Link from './Link'
import Panel from './Panel'
import Tag from './Tag'

const Container = styled(AngledContainer, {
const Container = styled(Panel, {
shouldForwardProp: (prop) =>
prop !== 'highlighted' && prop !== 'isPlaceholder',
})<{
Expand Down

0 comments on commit 18c1e9a

Please sign in to comment.