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

Feat#1 eun bean/calendar #13

Closed
wants to merge 29 commits into from
Closed

Feat#1 eun bean/calendar #13

wants to merge 29 commits into from

Conversation

eunbeann
Copy link
Member

@eunbeann eunbeann commented Jul 5, 2023

๐Ÿ”ฅ Related Issues

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

  • ~ ๊ธฐ๋Šฅ ๊ตฌํ˜„
  • ~ ํŽ˜์ด์ง€ ๊ตฌ์กฐํ™” ๋ฐ ์Šคํƒ€์ผ๋ง

โœ… PR Point

๋ฌด์Šจ ์ด์œ ๋กœ ์–ด๋–ป๊ฒŒ ์ฝ”๋“œ๋ฅผ ๋ณ€๊ฒฝํ–ˆ๋Š”์ง€

  • ํˆด๋ฐ” : ๋…„,์›”๋งŒ ๊ตฌ์„ฑ
export default function Toolbar(props: Date) {
  const { date } = props;
  return (
    <div className="rbc-toolbar">
      <span className="rbc-toolbar-label">{`${date.getFullYear()}๋…„ ${date.getMonth() + 1}์›”`}</span>
    </div>
  );
}
  • ์ผ์š”์ผ ์ƒ‰ ๋ฐ”๋€Œ๋Š” ์ปดํฌ๋„ŒํŠธ
export default function DateHeader(props) {
  const { date, label } = props;
  const isSunday = new Date(date).getDay() === 0;

  function headerStyle() {
    return {
      color: isSunday ? "red" : "inherit",
    };
  }

  return (
    <div className="rbc-date-header" style={headerStyle()}>
      {label}
    </div>
  );
}
  • ์ด๋ฒคํŠธ ๋ฌถ์Œ ์ƒ‰ ๋ฐ”๊พธ๋Š” ๋กœ์ง์ธ๋ฐ ...์—ฌ๊ธด ๋งŒ์•ฝ ์ด๊ฑฐ ์“ฐ๋ฉด ๊ฑฐํ•˜๊ฒŒ ์ˆ˜์ •ํ•ด์•ผํ•  ๋“ฏ ํ•ฉ๋‹ˆ๋‹ค.
  //  ์ผ์ • ๋“ฑ๋ก => ์นดํ…Œ๊ณ ๋ฆฌ ๋งˆ๋‹ค ์ƒ‰ ๊ตฌ๋ถ„
  const components = {
    event: (props: any) => {
      // ์‹œ๊ฐ„ ๋งŒ๋“ค๊ธฐ
      const dateString = props.event.start;
      const dateObject = new Date(dateString);
      const timeString = dateObject.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: false });
      const eventType = props?.event?.type;

      // ์ด๋ฒคํŠธ ์ƒ‰ ์ฃผ๊ธฐ
      switch (eventType) {
        case "ํ† ๋งˆํ† ":
          return (
            <Event style={{ background: "yellow" }}>
              {props.title} {timeString}
            </Event>
          );
        case "ํ‚ค์œ„":
          return (
            <Event style={{ background: "beige" }}>
              {props.title} {timeString}
            </Event>
          );
        case "๋ฐ”๋‚˜๋‚˜":
          return (
            <Event style={{ background: "lightgrey" }}>
              {props.title} {timeString}
            </Event>
          );
        case "์ฒด๋ฆฌ":
          return (
            <Event style={{ background: "lightblue" }}>
              {props.title} {timeString}
            </Event>
          );
        case "๋ณต์ˆญ์•„":
          return (
            <Event style={{ background: "lightpink" }}>
              {props.title} {timeString}
            </Event>
          );
        default:
          return null;
      }
    },
  };

์–ด๋–ค ๋ถ€๋ถ„์— ๋ฆฌ๋ทฐ์–ด๊ฐ€ ์ง‘์ค‘ํ•ด์•ผ ํ•˜๋Š”์ง€

์ด๋Ÿฐ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๊ฐ€ ์žˆ๊ณ ,, ์ด๋Ÿฐ ์‹์œผ๋กœ ๊ตด๋ฆฌ๋Š”๊ตฌ๋‚˜ ์ •๋„ ๋ด์ฃผ์‹œ๋ฉด ์ข‹๊ฒ ์Šต๋‹ˆ๋‹ค..

โšก๏ธโšก๏ธโšก๏ธโšก๏ธ ํƒ€์Šค ์ œ๋Œ€๋กœ ์•ˆํ•œ ๊ฑฐ ๋งŽ์„ํ…๋ฐ ๊ฐœํŒจ์ฃผ์„ธ์š” ์ง„์งœ ์ œ๋ฐœ โšก๏ธโšก๏ธโšก๏ธโšก๏ธ

๐Ÿ‘€ ์Šคํฌ๋ฆฐ์ƒท / GIF / ๋งํฌ

Screen Shot 2023-07-05 at 18 03 46 - 7์›”์ด ๋˜์–ด๋ฒ„๋ ค์„œ ๊ทธ๋ƒฅ ๋ƒ…๋‹ค 7์›”์— ๋ฐ•์•˜์–ด์—ฌ ใ…Ž

๐Ÿ“š Reference

  • ๊ตฌํ˜„์— ์ฐธ๊ณ ํ•œ ๋งํฌ (ํ•„์š”ํ•œ ๊ฒฝ์šฐ๋งŒ ์ž‘์„ฑํ•˜๊ณ  ์—†์œผ๋ฉด ์ง€์šฐ๊ธฐ)
  • https://www.notion.so/pretask-bean-b45b1a9fa13941e8b30c7f37d570e9cc?pvs=4
    => ์ด ์ชฝ์— ์•„์นด์ด๋น™ ํ•ด๋’€์Šต๋‹ˆ๋‹ค

eunbeann added 29 commits June 29, 2023 19:57
@eunbeann eunbeann added the feat-function ๊ธฐ๋Šฅ๊ตฌํ˜„ํ–ˆ์–ด์š” label Jul 5, 2023
@eunbeann eunbeann added feat-UI UI ๋งŒ๋“ค์—ˆ์–ด์š” ์€๋นˆ ์€๋นˆ ๋‹ด๋‹น labels Jul 5, 2023
@eunbeann eunbeann self-assigned this Jul 5, 2023
@eunbeann eunbeann linked an issue Jul 6, 2023 that may be closed by this pull request
3 tasks
@eunbeann eunbeann closed this Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat-function ๊ธฐ๋Šฅ๊ตฌํ˜„ํ–ˆ์–ด์š” feat-UI UI ๋งŒ๋“ค์—ˆ์–ด์š” ์€๋นˆ ์€๋นˆ ๋‹ด๋‹น
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ EunBean ] - ์บ˜๋ฆฐ๋” ๊ตฌํ˜„
1 participant