Skip to content

Latest commit

ย 

History

History
53 lines (38 loc) ยท 1.92 KB

README.ko.md

File metadata and controls

53 lines (38 loc) ยท 1.92 KB

React-iPhone-Layout

iphone_image

์„ค์น˜

$ npm install react-iphone-layout --save-dev

$ yarn add react-iphone-layout --dev

๊ธฐ๋Šฅ

  • ์›น ์•ฑ ํ˜ธํ™˜์„ฑ: iPhone ๋ ˆ์ด์•„์›ƒ์„ ์‰ฝ๊ฒŒ ์›น ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์— ํ†ตํ•ฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ์›น ๋ทฐ ์ง€์›: iPhone์„ ์›น์— ์ตœ์ ํ™”ํ•˜์—ฌ ์›ํ™œํ•œ ์›น ๋ทฐ๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
  • ๋™์  iPhone ๋ทฐ ํฌ๊ธฐ ์กฐ์ •: iPhone ๋ทฐ์˜ ํฌ๊ธฐ๋ฅผ ๋™์ ์œผ๋กœ ์กฐ์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ์‹ค์‹œ๊ฐ„ ๋ณด๊ธฐ ์ „ํ™˜: ์ œ์–ด ๋ฐ•์Šค๋ฅผ ํ†ตํ•ด iPhone ๋ทฐ์™€ ๋…ธํŠธ๋ถ ๋ทฐ๋ฅผ ์‹ค์‹œ๊ฐ„์œผ๋กœ ํ™•์ธํ•˜์—ฌ ๋‹ค์–‘ํ•œ ์žฅ์น˜์—์„œ ๋ ˆ์ด์•„์›ƒ์„ ์›ํ™œํ•˜๊ฒŒ ํ…Œ์ŠคํŠธํ•˜๊ณ  ์ตœ์ ํ™”ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ํšŒ์ „ ๊ธฐ๋Šฅ: iPhone ํ™”๋ฉด์˜ ํšŒ์ „ ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. (๋‚ด๋ถ€ ์ฝ˜ํ…์ธ ๋Š” ํšŒ์ „๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค)

์‹œ์ž‘ํ•˜๊ธฐ

import { IPhoneLayout } from "react-iphone-layout";
import "react-iphone-layout/dist/ReactIPhoneLayout.css"; // โœจ

function App() {
  return (
    <IPhoneLayout>
      <p>this is iPhone layout!!!</p>
    </IPhoneLayout>
  );
}

์†์„ฑ (Props)

Props Type Default
isStatusBar boolean true
position "top", "right", "bottom", "left" "right"
mode "iPhone", "laptop" "iPhone"
minSize number 60
defaultSize number 75
maxSize number 100

๋ฐ๋ชจ

๋ผ์ด์„ ์Šค

MIT