File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed
Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change 1+ import { CSSProperties } from 'react' ;
2+
13const TextWidget = ( { text } ) => {
24 const edge_color = 'black' ;
35 const ew = 1 ;
@@ -12,7 +14,7 @@ const TextWidget = ({ text }) => {
1214 `${ ew } px 0 0 ${ edge_color } `
1315 ] . join ( ', ' ) ;
1416
15- const style = {
17+ const style : CSSProperties = {
1618 boxSizing : 'border-box' ,
1719 position : 'absolute' ,
1820 right : 0 ,
Original file line number Diff line number Diff line change 1- import React from 'react'
1+ import React , { CSSProperties } from 'react'
22
3- class TimeWidget extends React . Component {
4- constructor ( props ) {
3+ interface TimeWidgetProps {
4+ size : number ;
5+ } ;
6+
7+ interface TimeWidgetState {
8+ time : Date ;
9+ } ;
10+
11+ class TimeWidget extends React . Component < TimeWidgetProps , TimeWidgetState > {
12+ interval : NodeJS . Timer | null ;
13+
14+ constructor ( props : TimeWidgetProps ) {
515 super ( props )
616 this . state = {
717 time : new Date ( )
@@ -11,7 +21,7 @@ class TimeWidget extends React.Component {
1121 render ( ) {
1222 const { size } = this . props
1323
14- const style = {
24+ const style : CSSProperties = {
1525 display : 'flex' ,
1626 justifyContent : 'center' ,
1727 alignItems : 'center' ,
You can’t perform that action at this time.
0 commit comments