Skip to content

Commit

Permalink
style: 투표 항목 추가 UI변경
Browse files Browse the repository at this point in the history
  • Loading branch information
hyeonjinan096 committed Jul 2, 2024
1 parent 36d3b8c commit 9121006
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
4 changes: 4 additions & 0 deletions public/icon-sprite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 9 additions & 14 deletions src/app/(post)/createPost/_components/VoteForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { ChangeEvent, useRef, useState } from 'react';

import Image from 'next/image';

import Button from '@/src/components/Button/Button';
import Icon from '@/src/components/Icon';
import { cn } from '@/src/utils/cn';

Expand Down Expand Up @@ -118,21 +119,15 @@ const VoteForm = ({ onChange, error }: VoteFormProps) => {
</div>
))}
{options.length < MAX_LIMIT && (
<div className='bg-dark-accent1 relative flex w-full items-center justify-end gap-3 self-end'>
<Icon
id='add-circle'
className='cursor-pointer'
size={24}
<div className='flex w-full items-center'>
<Button
type='button'
className='font-Pretendard ml-[32px] flex w-full items-center justify-center border border-gray-accent3 text-gray-accent4 enabled:active:bg-transparent'
onClick={handleAddOption}
/>
<TextInput
className='border text-gray-accent1'
placeholder='항목 추가'
readOnly
/>
<div className='absolute right-[10px] z-10 cursor-default'>
<Icon id='gallery' size={24} />
</div>
>
<Icon id='plus' size={20} />
<span>항목 추가</span>
</Button>
</div>
)}
{error && <p className='text-sm text-error'>{error}</p>}
Expand Down
3 changes: 2 additions & 1 deletion src/components/Icon/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ export type IconName =
| 'check-circle'
| 'log-out'
| 'write'
| 'arrow-right';
| 'arrow-right'
| 'plus';

0 comments on commit 9121006

Please sign in to comment.