-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
9 changed files
with
294 additions
and
108 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
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import Stepper from 'wowds-ui/Stepper'; | ||
import { User, UserRoleType } from '@/types/user'; | ||
import styled from '@emotion/styled'; | ||
|
||
const MemberStatusStepper = ({ member }: { member: User }) => { | ||
const { role } = member; | ||
|
||
const convertRoleToStep = (role: UserRoleType) => { | ||
switch (role) { | ||
case 'GUEST': | ||
return 1; | ||
case 'ASSOCIATE': | ||
return 2; | ||
default: | ||
return 3; | ||
} | ||
}; | ||
return ( | ||
<StepperContainer> | ||
<Stepper | ||
maxStep={3} | ||
step={convertRoleToStep(role)} | ||
labels={[ | ||
{ value: 1, label: '게스트' }, | ||
{ value: 2, label: '준회원' }, | ||
{ value: 3, label: '정회원' } | ||
]} | ||
/> | ||
</StepperContainer> | ||
); | ||
}; | ||
|
||
export default MemberStatusStepper; | ||
|
||
const StepperContainer = styled.div` | ||
width: 100%; | ||
display: flex; | ||
justify-content: center; | ||
height: 2.875rem; | ||
`; |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { | ||
forwardRef, | ||
InputHTMLAttributes, | ||
ForwardedRef, | ||
Ref, | ||
TextareaHTMLAttributes | ||
} from 'react'; | ||
import TextField from 'wowds-ui/TextField'; | ||
|
||
interface InputProps extends InputHTMLAttributes<HTMLInputElement> { | ||
value: string; | ||
label?: string; | ||
errorText?: string; | ||
isError?: boolean; | ||
} | ||
|
||
export const Input = forwardRef<HTMLInputElement, InputProps>( | ||
( | ||
{ value, placeholder, label = '', errorText, isError = false, ...props }, | ||
ref | ||
) => { | ||
return ( | ||
<TextField | ||
label={label} | ||
helperText={errorText} | ||
error={isError} | ||
{...props} | ||
// ref={ref as Ref<TextareaHTMLAttributes>} | ||
// error={isValid} | ||
// helperText={errors.name?.message} | ||
value={value} | ||
placeholder={placeholder} | ||
/> | ||
); | ||
} | ||
); | ||
|
||
Input.displayName = 'Input'; |
Oops, something went wrong.