-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Markdown 새부 스타일 수정 (10.06)
- Loading branch information
Showing
6 changed files
with
34 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,7 @@ | ||
import React from "react"; | ||
|
||
const p = (props: JSX.IntrinsicElements["p"]) => { | ||
const { children, ...rest } = props; | ||
|
||
const child = (children as JSX.Element[])?.[0]; | ||
|
||
if ((child && child.type === "p") || child.type === "div") { | ||
return <>{props.children}</>; | ||
} | ||
|
||
return <p {...rest}>{props.children}</p>; | ||
const p = ({ children, ...rest }: JSX.IntrinsicElements["p"]) => { | ||
return <div {...rest}>{children}</div>; | ||
}; | ||
|
||
export default p; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters