๋ชฉ๋กbootstrap (3)
๐ค ์์งlog ๐ค
๐ฃ 1. Modal Background CSS (๊ธฐ๋ณธ์ ์ธ) import styled from 'styled-components' const Modal = () => { return ( Modal ) } const Backdrop = styled.div` width: 100vw; height: 100vh; position: fixed; top: 0; left: 0; background: rgba(0, 0, 0, 0.7); ` const Container = styled.div` position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #fff; min-width: 300px; border-radius: 4px; `..
๐ฃ 1. Bootstrap.jsx ์ปดํฌ๋ํธ ์์ฑ import Dropdown from './Dropdown' const Bootstrap = () => { return ( ) } export default Bootstrap ๐ฃ 2. Dropdown.jsx ์ปดํฌ๋ํธ ์์ฑ import { useEffect, useState, useRef } from 'react' import styled from 'styled-components' const Dropdown = () => { const [showList, setShowList] = useState(false) const btnEl = useRef(null) useEffect(() => { const onClick = (e) => { if (btnEl.cur..
๐ฃ 1. Bootstrap.jsx ์ปดํฌ๋ํธ ์์ฑ import Accordion from './Accordion' import { accordionData } from '../../datas/bootstrap' const Bootstrap = () => { return ( ) } // ์์ฝ๋์ธ์ปดํฌ๋ํธ๋ฅผ ๋ฐ์ดํฐ๋ง ๊ฐ์๋ผ์ฐ๋ฉด ์์ ๋ด์ฉ์ ๊ต์ฒดํ๋ฉด์ ์ฌํ์ฉ๊ฐ๋ฅ export default Bootstrap ๐ฃ 2. Accordion.jsx ์ปดํฌ๋ํธ ์์ฑ import { useState } from 'react' import styled from 'styled-components' import { ReactComponent as Arrow } from './arrow.svg' const Accordion = ({ ..