Skip to content

Commit 31aaf1b

Browse files
committed
🎨 슬랙 관련 하드코딩 스타일들을 tailwind theme으로 추출
1 parent 5652dc0 commit 31aaf1b

File tree

25 files changed

+81
-42
lines changed

25 files changed

+81
-42
lines changed

src/app/archives/[channelId]/[threadId]/components/SlackThreadHeadMessageItem.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ export const SlackThreadHeadMessageItem = ({
1414
<>
1515
<SlackThreadMessageItem message={message} variants="thread-head" />
1616
<div className="flex items-center gap-3 px-4">
17-
<span className="text-[13px] text-[rgba(29,28,29,0.7)]">{messageCount}개의 댓글</span>
18-
<div className="h-[1px] grow bg-[rgb(29,28,29,0.13)]" />
17+
<span className="text-slack-text-opacity700 text-[13px]">{messageCount}개의 댓글</span>
18+
<div className="bg-slack-stroke-decorative h-[1px] grow" />
1919
</div>
2020
</>
2121
)

src/app/archives/[channelId]/components/SlackMessageMenu.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ const menu = tv({
2626
slots: {
2727
target:
2828
'hover:bg-grey200 ease-ease inline-flex cursor-pointer rounded-sm p-2 text-sm transition-colors duration-300',
29-
content:
30-
'min-w-[160px] rounded-lg border-none bg-white px-1 py-2 shadow-[shadow:rgba(23,23,28,0.05)_0px_2px_10px,rgba(23,23,28,0.05)_0px_2px_60px]',
29+
content: 'shadow-menu-overlay min-w-[160px] rounded-lg border-none bg-white px-1 py-2',
3130
buttonItem:
3231
'hover:bg-grey100 ease-ease text-text-secondary flex w-full cursor-pointer items-center gap-2 rounded-md px-3 py-2 text-sm font-semibold transition-colors duration-300',
3332
},
@@ -55,7 +54,7 @@ export const SlackMessageMenu = ({
5554
return (
5655
<div
5756
className={clsx(
58-
'invisible absolute top-0 right-2 -translate-y-1/2 rounded-sm border border-[rgba(29,28,29,0.13)] bg-white group-hover:visible',
57+
'border-slack-stroke-decorative invisible absolute top-0 right-2 -translate-y-1/2 rounded-sm border bg-white group-hover:visible',
5958
active && 'visible',
6059
isFirstItem && '!top-1 !-translate-y-0'
6160
)}

src/app/archives/[channelId]/components/SlackThreadInformation.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const SlackThreadInformation = ({
2020
}: SlackThreadInformationProps) => {
2121
return (
2222
<Link href={`/archives/${channelId}/${threadId}`}>
23-
<div className="group/link ease-ease mb-1 -ml-1 flex max-w-[600px] items-center justify-between rounded-md border border-transparent p-1 text-[13px] transition-colors duration-300 hover:border hover:border-[rgba(29,28,29,0.13)] hover:bg-white">
23+
<div className="group/link ease-ease hover:border-slack-stroke-decorative mb-1 -ml-1 flex max-w-[600px] items-center justify-between rounded-md border border-transparent p-1 text-[13px] transition-colors duration-300 hover:border hover:bg-white">
2424
<div className="flex items-center">
2525
<div className="flex items-center">
2626
{metadata.userAvatars.map((avatar) => (
@@ -34,10 +34,10 @@ export const SlackThreadInformation = ({
3434
/>
3535
))}
3636
</div>
37-
<div className="ml-[3px] font-bold text-[rgb(18,100,163)] hover:underline">
37+
<div className="text-slack-text-link ml-[3px] font-bold hover:underline">
3838
{metadata.messagesAmount - 1}개의 댓글
3939
</div>
40-
<div className="ml-2 text-[rgb(97,96,97)]">
40+
<div className="text-slack-text-secondary ml-2">
4141
{formatTemplates['(2024년)? 2월 3일, 오후 10:23'](archivedAt)} 에 아카이브됨
4242
</div>
4343
</div>

src/components/ImagePlaceholder/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const ImagePlaceholder = ({
1111
return (
1212
<div
1313
className={
14-
'bg-grey50 inline-block w-full overflow-hidden rounded-lg border border-[rgba(29,28,29,0.13)]'
14+
'bg-grey50 border-slack-stroke-decorative inline-block w-full overflow-hidden rounded-lg border'
1515
}
1616
style={{ aspectRatio: `${width} / ${height}` }}
1717
>

src/components/Slack/SlackMessageInput/IconWrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const IconWrapper = ({
1717
containerClassName
1818
)}
1919
>
20-
<div className={clsx('size-4.5 text-[rgba(29,28,29,0.7)]', className)}>{children}</div>
20+
<div className={clsx('text-slack-text-opacity700 size-4.5', className)}>{children}</div>
2121
</div>
2222
)
2323
}

src/components/Slack/SlackMessageInput/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const SlackMessageInput = ({
2626
paddingTop: commands.length * 60,
2727
}}
2828
>
29-
<div className="relative w-full rounded-lg border border-[rgba(29,28,29,0.3)]">
29+
<div className="border-slack-stroke-decorative relative w-full rounded-lg border">
3030
{!!commands.length && (
3131
<SlackMessageInputCommandOverlay>
3232
{commands.map((props) => (
@@ -37,7 +37,7 @@ export const SlackMessageInput = ({
3737
<div className="px-3 py-2">{children}</div>
3838
<div className="flex h-[40px] items-center justify-between pr-1 pl-1.5">
3939
<div className="flex items-center">
40-
<IconWrapper containerClassName="bg-[rgba(29,28,29,0.06)] rounded-full">
40+
<IconWrapper containerClassName="bg-slack-button-default rounded-full">
4141
<IconAdd />
4242
</IconWrapper>
4343
<IconWrapper>
@@ -50,7 +50,7 @@ export const SlackMessageInput = ({
5050
<IconEllipsisHorizontal />
5151
</IconWrapper>
5252
</div>
53-
<div className="flex h-7 items-center rounded-sm bg-[#007a5a] py-0.5">
53+
<div className="bg-slack-submit-primary flex h-7 items-center rounded-sm py-0.5">
5454
<div className="flex h-full items-center border-r border-white px-2">
5555
<IconSendFilled className="size-4 text-white" />
5656
</div>

src/components/Slack/SlackMessageInputCommandOverlay/index.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ interface CommandItemProps {
1010
const CommandItem = ({ name, description, selected }: CommandItemProps) => {
1111
return (
1212
<div
13-
className={clsx('flex h-[60px] w-full items-center', selected && 'bg-[#1264a3] text-white')}
13+
className={clsx(
14+
'flex h-[60px] w-full items-center',
15+
selected && 'bg-slack-command-active text-white'
16+
)}
1417
>
1518
<div className="flex w-full pl-2">
1619
<div className="mx-2 mt-1 mb-2.5">
@@ -44,7 +47,7 @@ const CommandItem = ({ name, description, selected }: CommandItemProps) => {
4447
export const SlackMessageInputCommandOverlay = ({ children }: React.PropsWithChildren<unknown>) => {
4548
return (
4649
<div className="absolute top-0.5 -left-1.5 w-full -translate-y-[100%]" data-command-overlay>
47-
<div className="w-full max-w-[435px] rounded-lg bg-white py-2 shadow-[shadow:rgba(29,_28,_29,_0.13)_0_0_0_1px,rgba(0,0,0,0.1)_0_4px_12px_0]">
50+
<div className="shadow-commands-overlay w-full max-w-[435px] rounded-lg bg-white py-2">
4851
{children}
4952
</div>
5053
</div>

src/components/Slack/SlackMessageItem/components/ReactionTooltipContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const ReactionTooltipContent = ({
4949
<div className="flex flex-col items-center gap-4">
5050
{reactionGroup.map((reaction) => (
5151
<div
52-
className="text-center text-[13px] leading-[1.38463] font-bold text-white"
52+
className="text-center text-[13px] leading-[18px] font-bold text-white"
5353
key={reaction.name}
5454
>
5555
{getReactionDescription(reaction)} 님이{' '}

src/components/Slack/SlackMessageItem/components/SlackMessageAttachment/SlackMessageAttachmentLayout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const AttachmentTitleLink = ({
4444
return (
4545
<div>
4646
<Link
47-
className="font-bold text-[rgb(18,100,163)] hover:underline"
47+
className="text-slack-text-link font-bold hover:underline"
4848
href={href}
4949
rel="noopener noreferrer"
5050
target="_blank"
@@ -62,7 +62,7 @@ const AttachmentText = ({ markdown, children }: AttachmentTextProps) => {
6262
export const SlackMessageAttachmentLayout = ({ children }: React.PropsWithChildren<unknown>) => {
6363
return (
6464
<div className="mb-2 flex max-w-[600px]">
65-
<div className="w-1 shrink-0 rounded-md bg-[rgb(221,221,221)]" />
65+
<div className="bg-slack-divider-inline w-1 shrink-0 rounded-md" />
6666
<div className="px-3 text-[15px]">{children}</div>
6767
</div>
6868
)

src/components/Slack/SlackMessageItem/components/SlackMessageAttachment/SlackMessageSlackAttachment.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ export const SlackMessageSlackAttachment = ({ attachment }: SlackMessageSlackAtt
1717
<SlackMessageAttachmentLayout.Text markdown>
1818
{attachment.text ?? ''}
1919
</SlackMessageAttachmentLayout.Text>
20-
<div className="flex items-center gap-1 pt-1 text-xs text-[rgb(97,96,97)]">
20+
<div className="text-slack-text-secondary flex items-center gap-1 pt-1 text-xs">
2121
<div>
2222
{formatTemplates['(2024년)? 2월 3일, 오후 10:23'](
2323
convertSlackTimestampToISOString(attachment.ts)
2424
)}
2525
</div>
26-
<div className="text-[rgb(221,221,221)]">{' | '}</div>
26+
<div className="text-slack-divider-inline">{' | '}</div>
2727
<Link
28-
className="text-[rgb(18,100,163)] hover:underline"
28+
className="text-slack-text-link hover:underline"
2929
href={attachment.url}
3030
rel="noopener noreferrer"
3131
target="_blank"

0 commit comments

Comments
 (0)