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

[#25] Toggle button 구현 #41

Merged
merged 6 commits into from
Jul 30, 2024
Merged

[#25] Toggle button 구현 #41

merged 6 commits into from
Jul 30, 2024

Conversation

hijiyun
Copy link
Collaborator

@hijiyun hijiyun commented Jul 30, 2024

What is this PR? 🔍

  1. toggle 버튼 컴포넌트 구현 완료

toggle component 사용법 📝

import { useState } from 'react';
import Toggle from './components/common/Toggle';

function App() {
  const [isChecked, setIsChecked] = useState<boolean>(false);

  const handleCheckedChange = (checked: boolean) => {
    setIsChecked(checked); 
  };
  return (
    <div>
      <Toggle checked={isChecked} onCheckedChange={handleCheckedChange} />
    </div>
  );
}

export default App;
  1. checked를 통해서 true/false를 받아올 수 있습니다 !

Screenshot 📷

스크린샷 2024-07-30 오후 10 35 52
스크린샷 2024-07-30 오후 10 36 02

close #25

@hijiyun hijiyun self-assigned this Jul 30, 2024
@hijiyun hijiyun linked an issue Jul 30, 2024 that may be closed by this pull request
Copy link

vercel bot commented Jul 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dnd-11th-8-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 30, 2024 1:36pm
dnd-11th-8-frontend-rvo5 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 30, 2024 1:36pm

@gihwan-dev
Copy link
Collaborator

Test Coverage

[email protected] coverage /home/runner/work/dnd-11th-8-frontend/dnd-11th-8-frontend
vitest run --coverage

RUN v2.0.4 /home/runner/work/dnd-11th-8-frontend/dnd-11th-8-frontend
Coverage enabled with v8

src/test/utils/sum.test.ts (1 test) 4ms
src/test/utils/SomeTest.test.tsx (1 test) 58ms

Test Files 2 passed (2)
Tests 2 passed (2)
Start at 13:36:58
Duration 1.31s (transform 48ms, setup 342ms, collect 22ms, tests 62ms, environment 841ms, prepare 172ms)

% Coverage report from v8

=============================== Coverage summary ===============================

Statements   : 0% ( 0/519 )
Branches     : 0% ( 0/21 )
Functions    : 0% ( 0/21 )
Lines        : 0% ( 0/519 )
================================================================================

@gihwan-dev gihwan-dev self-requested a review July 30, 2024 13:37
@gihwan-dev
Copy link
Collaborator

확인했습니다~~! 고생하셨어요! bb

@gihwan-dev gihwan-dev merged commit fed960d into main Jul 30, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[디자인 시스템] 토글 버튼 구현
2 participants