Skip to content

Instantly share code, notes, and snippets.

@kwoncharles
Last active February 24, 2019 07:06
Show Gist options
  • Save kwoncharles/7dd6b0bf133ee5fca32adf3863e2fffb to your computer and use it in GitHub Desktop.
Save kwoncharles/7dd6b0bf133ee5fca32adf3863e2fffb to your computer and use it in GitHub Desktop.
import React, { useState } from 'react';
import './PopUpView.css';
interface PopUpViewProps {}
function PopUpView(props: PopUpViewProps) {
const [selCheck, setSelCheck] = useState<boolean>(false);
const onClosePopUp = (): void => {
// Do nothing yet
}
const onCheck = (): void => {
setSelCheck(!selCheck);
}
return (
<div className="popup-wrapper">
<div className="popup-header">
<h2 className="popup-title">
Title
</h2>
</div>
<div className="popup-contents">
<article>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Non laudantium fugit ut explicabo odit suscipit laborum officia reiciendis repudiandae laboriosam? Vel corrupti sequi aut optio quidem, quisquam perspiciatis molestias esse!
</article>
</div>
<button onClick={onCheck}>
{selCheck
? 'Checked'
: '오늘 하루 열지 않기'
}
</button>
<button onClick={onClosePopUp}>
X
</button>
</div>
)
}
export default PopUpView;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment