Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add prop for custom CSS classes on specific dates #137

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add storybook examples of custom date classes
  • Loading branch information
sators committed Aug 23, 2017
commit ab9fd0bc69f5fbf59e2d25992b8cc1cf2bd6655b
13 changes: 13 additions & 0 deletions src/.stories/index.js
Original file line number Diff line number Diff line change
@@ -50,6 +50,19 @@ storiesOf('Basic settings', module)
))
.add('Disable Specific Weekdays', () => (
<InfiniteCalendar disabledDays={[0, 6]} />
))
.add('Assign Custom Classes Specific Dates', () => (
<InfiniteCalendar dateClasses={[{
className: "yellowBg",
dates: [-10, -5, -6, 5, 6, 7, 2].map(amount =>
addDays(today, amount)
),
},{
className: "boldText",
dates: [-10, -7, 2, 5, 6, 10].map(amount =>
addDays(today, amount)
)
}]} />
));

storiesOf('Higher Order Components', module)
7 changes: 7 additions & 0 deletions src/.stories/stories.scss
Original file line number Diff line number Diff line change
@@ -34,4 +34,11 @@
height: 100%;
margin: 0;
}
.yellowBg {
background: #ffff00;
border-radius: 50%;
}
.boldText {
font-weight: bold;
}
}