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

function TimeNow() {
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
  const cardstyled = {
    margin: "auto",
    padding: "1em",
    display: "flex",
    justifyContent: "center",
    width: "100%",
    borderWidth: "3px",
    borderRadius: "20px",
    borderColor: "rgb(110, 189, 142)",
    color: "#04AB70",
  };
  return (
    <Row className="text-center w-100 my-2">
      <Card style={cardstyled}>
        <Card.Title>
          <p>현재시각</p>
        </Card.Title>
        <Card.Text>
          <Clock format={"Y년 M월 D일"} />
          <br />
          <Clock
            format={"HH : mm : ss"}
            ticking={true}
            timezone={"Asia/Seoul"}
          />
        </Card.Text>
      </Card>
    </Row>
  );
Spark's avatar
layout    
Spark committed
36
37
}

38
export default TimeNow;