Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

takumi0616/236 の変更をdevelopからmainにマージ #240

Merged
merged 4 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@ const RecordAddModal: FC<ModalProps> = (props) => {
const [placeholder, setPlaceholder] = useState('Record Name');
const [isActive, setIsActive] = useState(false);

const toggleSwitch = () => {
setIsActive(!isActive);
};

const handleFocus = () => {
setIsFocused(true);
setPlaceholder('');
Expand Down Expand Up @@ -141,6 +137,11 @@ const RecordAddModal: FC<ModalProps> = (props) => {
getUsers(getUsersUrl);
}, []);

const toggleSwitch = () => {
setRelease(!release);
setIsActive(!isActive);
};

const handleRecord =
(input: string) =>
(
Expand Down Expand Up @@ -223,7 +224,7 @@ const RecordAddModal: FC<ModalProps> = (props) => {
<div className={s.modalButtons}>
<div className={s.releaseToggle}>
<div className={`${s.toggle} ${isActive ? s.checked : ''}`} onClick={toggleSwitch}>
<input type='checkbox' name='check' checked={isActive} onChange={() => {}} />
<input type='checkbox' name='check' checked={release} onChange={() => {}} />
</div>
</div>
<div className={s.modalSubmitButton}>
Expand Down
14 changes: 10 additions & 4 deletions view/next-project/src/pages/post/RecordCard.module.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
.cardWrapper {
display: flex;
flex-wrap: wrap;
gap: 20px;
justify-content: flex-start;
}

.cardContainer {
display: flex;
flex-direction: column;
justify-content: space-between;
width: calc(30% - 14px);
width: 350px;
height: 250px;
margin-bottom: 20px;
margin-left: 20px;
margin: 20px;
padding: 20px;
background-color: #fff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
Expand Down Expand Up @@ -104,4 +110,4 @@
75% {
transform: translateX(10%) rotate(10deg);
}
}
}
4 changes: 2 additions & 2 deletions view/next-project/src/pages/post/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const PostPage: React.FC = () => {
<PostLayout>
<div className={styles.sample}></div>
<ListHeader title='Drafts' />
<div style={{ display: 'flex', flexWrap: 'wrap', gap: '20px', justifyContent: 'flex-start' }}>
<div className={styles.cardWrapper}>
{drafts.map((draft) => (
<RecordCard key={draft.id} record={draft} />
))}
Expand All @@ -62,4 +62,4 @@ const PostPage: React.FC = () => {
);
};

export default PostPage;
export default PostPage;
Loading