@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
|