Skip to content

Commit

Permalink
style: lint 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludovico7 committed Nov 12, 2024
1 parent d75710b commit 49f78d2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
24 changes: 7 additions & 17 deletions client/src/components/block/Block.style.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { css, cva } from "@styled-system/css";
import { cva } from "@styled-system/css";

// κΈ°λ³Έ 블둝 μŠ€νƒ€μΌ
const baseBlockStyle = {
Expand All @@ -11,12 +11,12 @@ const baseBlockStyle = {
padding: "spacing.sm",
color: "gray.900",
backgroundColor: "transparent",
'&:empty::before': {
content: 'attr(data-placeholder)', // data-placeholder μ†μ„±μ˜ 값을 ν‘œμ‹œ
color: 'gray.300',
position: 'absolute',
pointerEvents: 'none' // ν…μŠ€νŠΈ μ„ νƒμ΄λ‚˜ 클릭 방지
}
"&:empty::before": {
content: "attr(data-placeholder)", // data-placeholder μ†μ„±μ˜ 값을 ν‘œμ‹œ
color: "gray.300",
position: "absolute",
pointerEvents: "none", // ν…μŠ€νŠΈ μ„ νƒμ΄λ‚˜ 클릭 방지
},
};

// 블둝 νƒ€μž…λ³„ μŠ€νƒ€μΌ variants
Expand Down Expand Up @@ -79,13 +79,3 @@ export const blockContainerStyle = cva({
isActive: false,
},
});

// 리슀트 μ•„μ΄ν…œμ€ λ³„λ„λ‘œ μ •μ˜ (νŠΉμˆ˜ν•œ μŠ€νƒ€μΌλ§ λ•Œλ¬Έ)
export const listItemStyle = css({
textStyle: "display-medium16",
display: "list-item",
outline: "none",
margin: "0",
padding: "0 0 0 spacing.md",
color: "gray.700",
});
4 changes: 2 additions & 2 deletions client/src/components/block/Block.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { memo } from "react";
import { EditorNode } from "../../types/markdown";
import { blockContainerStyle, listItemStyle } from "./Block.style";
import { blockContainerStyle } from "./Block.style";

interface BlockProps {
node: EditorNode;
Expand Down Expand Up @@ -62,7 +62,7 @@ export const Block: React.FC<BlockProps> = memo(
contentEditable: true,
suppressContentEditableWarning: true,
dangerouslySetInnerHTML: { __html: node.content },
className: blockContainerStyle({
className: blockContainerStyle({
type: node.type,
isActive,
}),
Expand Down

0 comments on commit 49f78d2

Please sign in to comment.