Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Latest commit

 

History

History
31 lines (22 loc) · 686 Bytes

date_badge.md

File metadata and controls

31 lines (22 loc) · 686 Bytes

Badges/DateBadge

Displays the month and day in badge or pill format.

DateBadge example

<div>
    <DateBadge date={new Date()} />
    <DateBadge month="Mar" day="12" />

    <DateBadge date={new Date()} pill />
    <DateBadge month="Mar" day="12" pill />
</div>

Props

date={Date}
Date to display using a Date instance.

month={string}
Month to display. Ignored when the date prop is set.

day={string|number}
Day to display. Ignored when the date prop is set.

CSS

Adds dp-date-badge to the root element.

Adds dp-date-badge--pill to the root element when displayed in pill form.