import React from 'react'
import './styles.scss'

interface UpdateNoteProps {
  /** Text, saying when the article/element is going to be updated */
  updating?: string
  /** Text, saying when the article/element has been updated */
  current?: string
}
/**
 * Renders a small note, when the article/element is going to be updated and when it has been updated.
 *
 */
export const UpdateNote = ({ updating, current }: UpdateNoteProps) => (
  <div className='cbUpdateNote'>
    <span className='wrapper'>
      {updating && <span className='updating'>{updating}</span>}
      {current && <span className='current'>{current}</span>}
    </span>
  </div>
)
