* storybook v2 init * Merge config into storybook vite build * Remove path * Storybook config tweaks * Added styles and settings for storybook v2, and started working on button documentation and examples. * Badges + flex wrap on mobile * Breadcrumbs+button+avatar * Checkbox * Input + moving files around * WIP table * WIP table grid * Replaced imports for new components. * Added first steps for varianttable. * Small alignment fix. * Custom Args Table - With scrollbar * Adding table to components that need it + darkmode * Add intro * Fix types * Remove V1 storybook and replace with V2 * Fix badge type error * Fixed storybook dependencies * Added cover image to storybook * Remove vita from ts config, we dont use vite. * Fixed button import. * Explained postcss pseudo plugin. * Fixed badge import. * Add Avatar Stories * ButtonGroup Stories * Fixed imports * Add checkbox stories * Add exports for differnt types of inputs * Fix form and text area input * Fix mass import errors Co-authored-by: Jeroen Reumkens <hello@jeroenreumkens.nl> Co-authored-by: Alex van Andel <me@alexvanandel.com>
32 lines
852 B
TypeScript
32 lines
852 B
TypeScript
import { classNames } from "@calcom/lib";
|
|
|
|
interface ExampleProps {
|
|
children: React.ReactNode;
|
|
title: string;
|
|
}
|
|
export const Example = ({ children, title }: ExampleProps) => {
|
|
return (
|
|
<div className="examples-item">
|
|
<span className="examples-item-title">{title}</span>
|
|
<div className="examples-item-content">{children}</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
interface ExamplesProps {
|
|
children: React.ReactNode;
|
|
title: string;
|
|
footnote?: React.ReactNode;
|
|
dark?: boolean;
|
|
}
|
|
|
|
export const Examples = ({ children, title, footnote = null, dark }: ExamplesProps) => {
|
|
return (
|
|
<div className={classNames("examples", dark && "dark")}>
|
|
<h2 className="examples-title">{title}</h2>
|
|
<div className="examples-content">{children}</div>
|
|
{!!footnote && <div className="examples-footnote">{footnote}</div>}
|
|
</div>
|
|
);
|
|
};
|