chore: prettier
This commit is contained in:
1 parent
aa5e2ac9a5
commit
8071016848
57 files changed
+1309
-1090
No files matched your search
@@ -1,38 +1,48 @@
|
||||
import { Canvas, Meta, Story, ArgsTable } from '@storybook/addon-docs';
|
||||
import { Examples, Example, Note, Title, VariantsTable, VariantColumn, RowTitles, CustomArgsTable} from '@calcom/storybook/components'
|
||||
import { Canvas, Meta, Story, ArgsTable } from "@storybook/addon-docs";
|
||||
|
||||
import {
|
||||
Examples,
|
||||
Example,
|
||||
Note,
|
||||
Title,
|
||||
VariantsTable,
|
||||
VariantColumn,
|
||||
RowTitles,
|
||||
CustomArgsTable,
|
||||
} from "@calcom/storybook/components";
|
||||
import { Icon } from "@calcom/ui";
|
||||
|
||||
import { EventDetails } from './Details';
|
||||
import { EventTitle } from './Title';
|
||||
import { EventMembers } from './Members';
|
||||
import { mockEvent } from './event.mock.ts';
|
||||
import { EventDetails } from "./Details";
|
||||
import { EventMembers } from "./Members";
|
||||
import { EventTitle } from "./Title";
|
||||
import { mockEvent } from "./event.mock.ts";
|
||||
|
||||
<Meta title="Features/Events/Meta" component={EventDetails} />
|
||||
|
||||
<Title title="Event Meta" suffix="Brief" subtitle="Version 2.0 — Last Update: 12 Dec 2022"/>
|
||||
<Title title="Event Meta" suffix="Brief" subtitle="Version 2.0 — Last Update: 12 Dec 2022" />
|
||||
|
||||
<Examples title="Combined event meta block">
|
||||
<div style={{maxWidth: 300}}>
|
||||
<div style={{ maxWidth: 300 }}>
|
||||
<Example title="Event Title">
|
||||
<EventTitle event={mockEvent}/>
|
||||
<EventTitle event={mockEvent} />
|
||||
</Example>
|
||||
<Example title="Event Details">
|
||||
<EventDetails event={mockEvent}/>
|
||||
<EventDetails event={mockEvent} />
|
||||
</Example>
|
||||
</div>
|
||||
</Examples>
|
||||
|
||||
<Canvas>
|
||||
<Story name="All variants">
|
||||
<VariantsTable titles={['Event Meta Components']} columnMinWidth={150}>
|
||||
<VariantsTable titles={["Event Meta Components"]} columnMinWidth={150}>
|
||||
<VariantRow variant="">
|
||||
<div style={{maxWidth: 300}}>
|
||||
<EventMembers users={
|
||||
[
|
||||
{name: "Pro example", username: "pro"},
|
||||
{name: "Team example", username: "team"}
|
||||
]
|
||||
} />
|
||||
<div style={{ maxWidth: 300 }}>
|
||||
<EventMembers
|
||||
users={[
|
||||
{ name: "Pro example", username: "pro" },
|
||||
{ name: "Team example", username: "team" },
|
||||
]}
|
||||
/>
|
||||
<EventTitle>Quick catch-up</EventTitle>
|
||||
<EventDetails event={mockEvent} />
|
||||
</div>
|
||||
|
||||
@@ -55,30 +55,31 @@ export const Template = (args) => <Calendar {...args} />;
|
||||
</Canvas>
|
||||
|
||||
<Canvas>
|
||||
<Story name="Onclick Handlers"
|
||||
args={{
|
||||
startHour: 8,
|
||||
endHour: 17,
|
||||
hoverEventDuration: 30,
|
||||
}}
|
||||
argTypes={{
|
||||
startHour: {
|
||||
control: { type: "number", min: 0, max: 23, step: 1 },
|
||||
},
|
||||
endHour: {
|
||||
control: { type: "number", min: 0, max: 23, step: 1 },
|
||||
},
|
||||
hoverEventDuration: {
|
||||
control: { type: "number", min: 0, max: 60, step: 1 },
|
||||
},
|
||||
}}
|
||||
>
|
||||
{({...args}) => (
|
||||
<Calendar {...args}
|
||||
events={events}
|
||||
onEventClick={(e) => alert(e.title)}
|
||||
onEmptyCellClick={(date) => alert(date.toString())}
|
||||
sortEvents
|
||||
<Story
|
||||
name="Onclick Handlers"
|
||||
args={{
|
||||
startHour: 8,
|
||||
endHour: 17,
|
||||
hoverEventDuration: 30,
|
||||
}}
|
||||
argTypes={{
|
||||
startHour: {
|
||||
control: { type: "number", min: 0, max: 23, step: 1 },
|
||||
},
|
||||
endHour: {
|
||||
control: { type: "number", min: 0, max: 23, step: 1 },
|
||||
},
|
||||
hoverEventDuration: {
|
||||
control: { type: "number", min: 0, max: 60, step: 1 },
|
||||
},
|
||||
}}>
|
||||
{({ ...args }) => (
|
||||
<Calendar
|
||||
{...args}
|
||||
events={events}
|
||||
onEventClick={(e) => alert(e.title)}
|
||||
onEmptyCellClick={(date) => alert(date.toString())}
|
||||
sortEvents
|
||||
/>
|
||||
)}
|
||||
</Story>
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
.scheduler-wrapper {
|
||||
--gridDefaultSize: 1.75rem;
|
||||
--hoursInDay: 24;
|
||||
--minuteInHour:60;
|
||||
--minuteInHour: 60;
|
||||
--gridMobileSize: 100vw;
|
||||
--calendar-offset-top: 28px;
|
||||
}
|
||||
|
||||
.scheduler-grid-row-template{
|
||||
.scheduler-grid-row-template {
|
||||
grid-template-rows: var(--gridMobileSize) repeat(attr(data-gridstoperperday number), var(--gridMobileSize)) auto;
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
.scheduler-grid-row-template {
|
||||
grid-template-rows: var(--gridDefaultSize) repeat(attr(data-gridstoperperday number), var(--gridDefaultSize)) auto;
|
||||
grid-template-rows: var(--gridDefaultSize) repeat(
|
||||
attr(data-gridstoperperday number),
|
||||
var(--gridDefaultSize)
|
||||
) auto;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,38 +10,40 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.tremor-DateRangePicker-calendarButton, .tremor-DateRangePicker-dropdownButton {
|
||||
@apply border-subtle bg-default text-sm leading-4 placeholder:text-sm placeholder:font-normal focus-within:ring-0 focus-within:ring-emphasis hover:border-subtle dark:focus-within:ring-emphasis hover:bg-subtle
|
||||
.tremor-DateRangePicker-calendarButton,
|
||||
.tremor-DateRangePicker-dropdownButton {
|
||||
@apply border-subtle bg-default focus-within:ring-emphasis hover:border-subtle dark:focus-within:ring-emphasis hover:bg-subtle text-sm leading-4 placeholder:text-sm placeholder:font-normal focus-within:ring-0;
|
||||
}
|
||||
|
||||
.tremor-DateRangePicker-calendarButtonText,.tremor-DateRangePicker-dropdownButtonText {
|
||||
@apply text-default
|
||||
.tremor-DateRangePicker-calendarButtonText,
|
||||
.tremor-DateRangePicker-dropdownButtonText {
|
||||
@apply text-default;
|
||||
}
|
||||
|
||||
.tremor-DateRangePicker-calendarModal,.tremor-DateRangePicker-dropdownModal{
|
||||
@apply dark:invert
|
||||
.tremor-DateRangePicker-calendarModal,
|
||||
.tremor-DateRangePicker-dropdownModal {
|
||||
@apply dark:invert;
|
||||
}
|
||||
|
||||
.tremor-Card-root{
|
||||
@apply p-5
|
||||
.tremor-Card-root {
|
||||
@apply p-5;
|
||||
}
|
||||
|
||||
.tremor-TableCell-root{
|
||||
@apply pl-0
|
||||
.tremor-TableCell-root {
|
||||
@apply pl-0;
|
||||
}
|
||||
|
||||
.recharts-responsive-container{
|
||||
@apply -mx-4
|
||||
.recharts-responsive-container {
|
||||
@apply -mx-4;
|
||||
}
|
||||
.tremor-Card-root > p {
|
||||
@apply text-base font-semibold mb-2
|
||||
@apply mb-2 text-base font-semibold;
|
||||
}
|
||||
|
||||
.tremor-Legend-legendItem{
|
||||
@apply ml-2
|
||||
.tremor-Legend-legendItem {
|
||||
@apply ml-2;
|
||||
}
|
||||
|
||||
.tremor-TableBody-root{
|
||||
@apply divide-subtle
|
||||
}
|
||||
.tremor-TableBody-root {
|
||||
@apply divide-subtle;
|
||||
}
|
||||
@@ -243,7 +243,7 @@ const RemoveTimeButton = ({
|
||||
const TimeRangeField = ({ className, value, onChange }: { className?: string } & ControllerRenderProps) => {
|
||||
// this is a controlled component anyway given it uses LazySelect, so keep it RHF agnostic.
|
||||
return (
|
||||
<div className={classNames("flex flex-row gap-1",className)}>
|
||||
<div className={classNames("flex flex-row gap-1", className)}>
|
||||
<LazySelect
|
||||
className="inline-block w-[100px]"
|
||||
value={value.start}
|
||||
|
||||
Reference in new issue
Block a user