Skip to content

Conversation

@HwangSunBeom
Copy link
Contributor

๐Ÿ”ฅ Related Issues

๐Ÿ’ป ์ž‘์—… ๋‚ด์šฉ

  • AI ํ”„๋กฌํ”„ํŠธ on/off ๋ฒ„ํŠผ ์ž‘์„ฑ
  • AI ํ”„๋กฌํ”„ํŠธ UI ์ž‘์„ฑ
  • ํ”„๋กฌํ”„ํŠธ๋ฅผ ์ถœ๋ ฅํ•  ๋ชจ๋‹ฌ ์ž‘์„ฑ
  • ๋ชจ๋‹ฌ ์ƒํƒœ ๊ด€๋ฆฌ

โœ… PR Point

  • ์†Œ์Šค์ฝ”๋“œ ์„ค๋ช… ( ppt์— ๋“ค์–ด๊ฐˆ ๋ถ€๋ถ„ )

๋ชจ๋‹ฌ

const Modal: React.FC<ModalProps> = () => {
  const [isActive, setIsActive] = useState<boolean>(false);

  const handleClick = () => {
    setIsActive((prev) => !prev);
  };

  return (
    <>
      <AIButton onClick={handleClick} isActive={isActive} />
      {isActive && (
        <ModalOverlay onClick={() => setIsActive(false)}>
          <ModalContent onClick={(e) => e.stopPropagation()}>
            <p>This is a modal content!</p>
            <CloseButton onClick={() => setIsActive(false)}>Close</CloseButton>
          </ModalContent>
          <TextButton onClick={handleClick}>irp๋ž€?</TextButton>
        </ModalOverlay>
      )}
    </>
  );
};

AI ํ”„๋กฌํ”„ํŠธ ๋ฒ„ํŠผ

import { useState } from 'react';
import styled from '@emotion/styled';
import Icon_waiting from '../assets/waitingAI.svg';
import Icon_active from '../assets/activeAI.svg';
import { StyledAIButton } from '../common';

interface Props {
    onClick: () => void;
    isActive: boolean
}

const AIButton = ({onClick, isActive}:Props) => {

  return (
    <StyledAIButton onClick={onClick}>
      <img src={isActive ? Icon_active : Icon_waiting} alt="button content" />
    </StyledAIButton>
  );
};

export default AIButton;

โ˜€๏ธ ์Šคํฌ๋ฆฐ์ƒท / GIF / ํ™”๋ฉด ๋…นํ™”

๋ชจ๋‹ฌ on/off์— ๋”ฐ๋ฅธ ์ƒํƒœ๋ณ€ํ™”

แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2024-12-03 แ„‹แ…ฉแ„’แ…ฎ 3 18 28 แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2024-12-03 แ„‹แ…ฉแ„’แ…ฎ 3 18 37

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.

[component] AI prompt

2 participants