TimeNow.js 850 Bytes
Newer Older
1
import React from "react";
Spark's avatar
Spark committed
2
import { Row, Col } from "react-bootstrap";
3
4
import Clock from "react-live-clock";
import "../App.css";
Spark's avatar
layout    
Spark committed
5
6

function TimeNow() {
7
8
  const cardstyled = {
    margin: "auto",
Spark's avatar
Spark committed
9
    padding: "0.5em",
10
11
12
    display: "flex",
    justifyContent: "center",
    width: "100%",
Spark's avatar
Spark committed
13
14
15
16
    border: 'none',
    flexDirection: 'column',
    color: "rgb(70, 70, 70) ",
    fontWeight: '300'
17
  };
Spark's avatar
Spark committed
18

19
  return (
Spark's avatar
Spark committed
20
21
22
23
24
    <Row className="text-center w-100" style={cardstyled}>
      <Col className='d-flex justify-content-center'>
        <Clock format={"Y년 M월 D일"} />
      </Col>
      <Col className='d-flex justify-content-center'>
25
26
27
28
29
30
31
        <strong>
          <Clock
            format={"HH : mm : ss"}
            ticking={true}
            timezone={"Asia/Seoul"}
          />
        </strong>
Spark's avatar
Spark committed
32
      </Col>
33
34
    </Row>
  );
Spark's avatar
layout    
Spark committed
35
36
}

37
export default TimeNow;