Skip to content

Commit

Permalink
Merge pull request #44 from depromeet/refactor/28/convention-leeminhe…
Browse files Browse the repository at this point in the history
…e119

컨벤션 반영
  • Loading branch information
leeminhee119 authored Jul 16, 2024
2 parents 9751c72 + 9545fd6 commit ed8381f
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 21 deletions.
8 changes: 3 additions & 5 deletions src/app/test/Staging.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ import { useEffect } from "react";

import Button from "@/component/Button/Button.tsx";
import { ButtonProvider } from "@/component/Button/ButtonProvider.tsx";
import CheckBox from "@/component/common/CheckBox/CheckBox";
import CheckBoxGroup from "@/component/common/CheckBox/CheckBoxGroup";
import { Input, InputLabelContainer, Label } from "@/component/common/Input";
import Radio from "@/component/common/RadioButton/Radio";
import RadioButtonGroup from "@/component/common/RadioButton/RadioButtonGroup";
import { CheckBox, CheckBoxGroup } from "@/component/common/checkBox";
import { Input, InputLabelContainer, Label } from "@/component/common/input";
import { Radio, RadioButtonGroup } from "@/component/common/radioButton";
import { useCheckBox } from "@/hooks/useCheckBox";
import { useInput } from "@/hooks/useInput";
import { useRadioButton } from "@/hooks/useRadioButton";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type CheckBoxProps = {
children: React.ReactNode;
};

const CheckBox = ({ value, children }: CheckBoxProps) => {
export function CheckBox({ value, children }: CheckBoxProps) {
const checkboxContext = useContext(CheckBoxContext);
return (
<ListItemCard variant={checkboxContext?.isChecked(value) ? "theme" : "default"}>
Expand Down Expand Up @@ -41,6 +41,4 @@ const CheckBox = ({ value, children }: CheckBoxProps) => {
/>
</ListItemCard>
);
};

export default CheckBox;
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type CheckBoxGroupProps = {
children: React.ReactNode;
} & CheckBoxContextState;

const CheckBoxGroup = ({ children, ...props }: CheckBoxGroupProps) => {
export function CheckBoxGroup({ children, ...props }: CheckBoxGroupProps) {
return (
<div
css={css`
Expand All @@ -24,6 +24,4 @@ const CheckBoxGroup = ({ children, ...props }: CheckBoxGroupProps) => {
<CheckBoxContext.Provider value={props}>{children}</CheckBoxContext.Provider>
</div>
);
};

export default CheckBoxGroup;
}
2 changes: 2 additions & 0 deletions src/component/common/checkBox/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { CheckBox } from "./CheckBox";
export { CheckBoxGroup } from "./CheckBoxGroup";
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type RadioProps = {
children: React.ReactNode;
};

const Radio = ({ value, children }: RadioProps) => {
export function Radio({ value, children }: RadioProps) {
const radioContext = useContext(RadioContext);
return (
<ListItemCard variant={radioContext?.isChecked(value) ? "theme" : "default"}>
Expand Down Expand Up @@ -42,6 +42,4 @@ const Radio = ({ value, children }: RadioProps) => {
/>
</ListItemCard>
);
};

export default Radio;
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type RadioButtonGroupProps = {
children: React.ReactNode;
} & RadioContextState;

const RadioButtonGroup = ({ children, ...props }: RadioButtonGroupProps) => {
export function RadioButtonGroup({ children, ...props }: RadioButtonGroupProps) {
return (
<div
css={css`
Expand All @@ -25,6 +25,4 @@ const RadioButtonGroup = ({ children, ...props }: RadioButtonGroupProps) => {
<RadioContext.Provider value={props}>{children}</RadioContext.Provider>
</div>
);
};

export default RadioButtonGroup;
}
2 changes: 2 additions & 0 deletions src/component/common/radioButton/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { Radio } from "./Radio";
export { RadioButtonGroup } from "./RadioButtonGroup";

0 comments on commit ed8381f

Please sign in to comment.