@hey-mirror/today
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-alpha.11 • Public • Published

@hey-mirror/today

Example

import styled from '@emotion/styled';
import { Today } from '@hey-mirror/today';

const Wrapper = styled.div({
  display: 'flex',
  flexDirection: 'column',
  gap: 8,
});

export const Display = () => (
  <Today locale='en-US'>
    <Wrapper>
      <Today.Day format='long' />
      <span>
        <Today.Month format='short' /> <Today.Day format='2-digit' />,{' '}
        <Today.Year />
      </span>
    </Wrapper>
  </Today>
);

API

<Today />

Prop Default Type
children - ReactNode
locale en-US string

<Today.Year />

Prop Default Type
className - string
format numeric 2-digit or numeric

<Today.Month />

Prop Default Type
className - string
format long long, short, narrow, 2-digit or numeric

<Today.Day />

Prop Default Type
className - string
format long long, short, narrow, 2-digit or numeric

Readme

Keywords

none

Package Sidebar

Install

npm i @hey-mirror/today

Weekly Downloads

0

Version

1.0.0-alpha.11

License

none

Unpacked Size

30.3 kB

Total Files

74

Last publish

Collaborators

  • brendan