Skip to content

Commit

Permalink
feat: add RangeCalendar sandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
Arucard89 committed Feb 1, 2024
1 parent 7743e52 commit 1ea4df2
Showing 1 changed file with 43 additions and 1 deletion.
44 changes: 43 additions & 1 deletion src/content/components/date-components/RangeCalendar/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,49 @@
import dynamic from 'next/dynamic';
import {Repos} from 'src/types/common';

import {Component} from '../../types';
import {getGithubUrl, getReadmeUrl, mappingOptions} from '../../utils';

const getterOptions = {repoName: Repos.DateComponents, componentName: 'RangeCalendar'};

export const rangeCalendarConfig: Component = {
id: 'range-calendar',
title: 'Range Calendar',
isComingSoon: true,
githubUrl: getGithubUrl(getterOptions),
content: {
readmeUrl: getReadmeUrl(getterOptions),
},
sandbox: {
component: dynamic(() =>
import('../examples/components/index').then((mod) => mod.RangeCalendarExample),
),
props: {
size: {
type: 'radioButton',
values: mappingOptions(['m', 'l', 'xl']),
defaultValue: 'm',
},
mode: {
type: 'select',
values: mappingOptions(['days', 'months', 'quarters', 'years']),
},
disabled: {
type: 'switch',
defaultValue: false,
},
readOnly: {
type: 'switch',
defaultValue: false,
},
minValue: {
type: 'input',
},
maxValue: {
type: 'input',
},
focusedValue: {
type: 'input',
},
},
},
};

0 comments on commit 1ea4df2

Please sign in to comment.