Skip to content

Commit

Permalink
Merge pull request #61 from Na-o-man/feat/#48
Browse files Browse the repository at this point in the history
feat: addgroup 성격 선택 디자인 변경
  • Loading branch information
E-hyeon authored Aug 7, 2024
2 parents 99e44cc + 2d9700d commit 01a6b02
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ function App() {
);
}

export default App;
export default App;
1 change: 1 addition & 0 deletions src/assets/icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export { ReactComponent as InputProfile } from './icon/add_group/InputProfile.sv
export { ReactComponent as PlusCircle } from './icon/add_group/plusCircle.svg';
export { ReactComponent as NowInportName } from './icon/add_group/nowinportname.svg';
export { ReactComponent as xCircle } from './icon/add_group/xCircle.svg';
export { ReactComponent as SelectType } from './icon/add_group/SelectType.svg';
// common
export { ReactComponent as Cloud } from './icon/common/cloud.svg';
export { ReactComponent as Fly } from './icon/common/fly.svg';
Expand Down
24 changes: 24 additions & 0 deletions src/assets/icon/add_group/SelectType.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import * as S from './Styles';
import { useNavigate } from 'react-router-dom';
import { useRecoilValue } from 'recoil';
import { namesState } from '../state';
import { namesState } from '../../../recoil/states/addgroupState';
import MembernameList from './membernameList/membernameList';

function MemberNameHead() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from 'react';
import * as S from './Styles';
import { useRecoilState } from 'recoil';
import { namesState } from '../../state'; // Recoil 상태가 정의된 파일을 import
import { namesState } from '../../../../recoil/states/addgroupState'; // Recoil 상태가 정의된 파일을 import

interface MembernameCreateProps {
addName: (name: string) => void;
Expand Down
2 changes: 1 addition & 1 deletion src/components/AddGroup/AddGroupShare/AddGroupshare.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import * as S from './Styles';
import { useRecoilValue } from 'recoil';
import { placeState } from '../state';
import { placeState } from '../../../recoil/states/addgroupState';

const AddGroupshare = () => {
const place = useRecoilValue(placeState);
Expand Down
7 changes: 6 additions & 1 deletion src/components/AddGroup/AddGroupSpace/Space.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ import React, { useState } from 'react';
import { useNavigate } from 'react-router-dom';
import * as S from './Styles';
import { useRecoilState, useRecoilValue } from 'recoil';
import { namesState, newtypeState, placeState, typeState } from '../state';
import {
namesState,
newtypeState,
placeState,
typeState,
} from '../../../recoil/states/addgroupState';

const Space = () => {
const navigate = useNavigate();
Expand Down
6 changes: 5 additions & 1 deletion src/components/AddGroup/AddGroupType/GroupType.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import * as S from './Styles';
import { useNavigate } from 'react-router-dom';
import MemberTypeList from './MemberTypeList/MemberTypeList';
import { useRecoilValue } from 'recoil';
import { namesState, newtypeState, typeState } from '../state';
import {
namesState,
newtypeState,
typeState,
} from '../../../recoil/states/addgroupState';

function MemberTypeHead() {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
import React from 'react';
import * as S from './Styles';
import { useRecoilState } from 'recoil';
import { newtypeState, typeState } from '../../state';
import {
newtypeState,
typeState,
} from '../../../../recoil/states/addgroupState';

const MemberTypeCreate = () => {
const [newType, setNewType] = useRecoilState(newtypeState); // Recoil 상태를 사용하여 newType을 관리합니다.
Expand Down Expand Up @@ -49,12 +52,12 @@ const MemberTypeList: React.FC = () => {
<S.TypeList>
{initialTypes.map((Type, index) => (
<S.TypeContainer key={index} onClick={() => handleTypeClick(Type)}>
<S.NowImportType />
<S.Type
style={{
color: selectedTypes.includes(Type) ? 'skyblue' : 'white',
}}
>
{selectedTypes.includes(Type) ? (
<S.SelectType />
) : (
<S.NowImportType />
)}
<S.Type>
{Type}
</S.Type>
</S.TypeContainer>
Expand Down
7 changes: 7 additions & 0 deletions src/components/AddGroup/AddGroupType/MemberTypeList/Styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ export const NowImportType = styled(I.GroupBtn)`
align-items: center;
`;

export const SelectType = styled(I.SelectType)`
position: absolute;
width: 71px;
z-index: 0;
align-items: center;
`;

export const Type = styled.p`
overflow: hidden;
white-space: nowrap;
Expand Down
File renamed without changes.

0 comments on commit 01a6b02

Please sign in to comment.