All files / app/components ExplodingDate.tsx

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28                      2x         2x 4x                    
import React from 'react';
import { style } from 'app/styles';
 
import { ExplodeOnChange } from 'app/components/ExplodeOnChange';
import { EpochDateTime } from 'app/components/EpochDateTime';
 
export interface ExplodingDateProps {
  value: number;
  style?: object | string;
}
 
const dateOptions = {
  month: 'long',
  timeZoneName: 'short',
};
 
export const ExplodingDate = (props: ExplodingDateProps): JSX.Element => {
  return (
    <ExplodeOnChange value={props.value}>
      <EpochDateTime
        value={props.value}
        displayOptions={dateOptions}
        style={style(props.style)}
      />
    </ExplodeOnChange>
  );
};