mm
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { ButtonGallery } from "./button-gallery";
|
||||
import { Theme } from "../src/components/theme/theme";
|
||||
import { PopoverGallery } from "./popover-gallery";
|
||||
|
||||
export function App() {
|
||||
return (
|
||||
<div className="app">
|
||||
<Theme>
|
||||
<ButtonGallery />
|
||||
<PopoverGallery />
|
||||
</Theme>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
import { DownloadSvg } from "../src/assets/svg/DownloadSvg";
|
||||
import { Button } from "../src/components/button/button";
|
||||
import { IW } from "./iw";
|
||||
import { OW } from "./ow";
|
||||
|
||||
export const ButtonGallery = () => {
|
||||
return (
|
||||
<OW>
|
||||
<IW>
|
||||
<Button size="xs">xsmall</Button>
|
||||
<Button size="xs" iconSvg={<DownloadSvg />}>
|
||||
xsmall
|
||||
</Button>
|
||||
<Button size="xs" iconSvg={<DownloadSvg />} isIconOnly={true}>
|
||||
xsmall
|
||||
</Button>
|
||||
<Button
|
||||
size="xs"
|
||||
iconSvg={<DownloadSvg />}
|
||||
canLoading={true}
|
||||
isLoading={true}
|
||||
>
|
||||
isLoading
|
||||
</Button>
|
||||
<Button size="xs" iconSvg={<DownloadSvg />} canLoading={true}>
|
||||
canLoading
|
||||
</Button>
|
||||
</IW>
|
||||
<IW>
|
||||
<Button size="sm">small</Button>
|
||||
<Button size="sm" iconSvg={<DownloadSvg />}>
|
||||
small
|
||||
</Button>
|
||||
<Button size="sm" iconSvg={<DownloadSvg />} isIconOnly={true}>
|
||||
small
|
||||
</Button>
|
||||
<Button
|
||||
size="sm"
|
||||
iconSvg={<DownloadSvg />}
|
||||
canLoading={true}
|
||||
isLoading={true}
|
||||
>
|
||||
isLoading
|
||||
</Button>
|
||||
<Button size="sm" iconSvg={<DownloadSvg />} canLoading={true}>
|
||||
canLoading
|
||||
</Button>
|
||||
</IW>
|
||||
<IW>
|
||||
<Button size="md">medium</Button>
|
||||
<Button size="md" iconSvg={<DownloadSvg />}>
|
||||
medium
|
||||
</Button>
|
||||
<Button size="md" iconSvg={<DownloadSvg />} isIconOnly={true}>
|
||||
medium
|
||||
</Button>
|
||||
<Button
|
||||
size="md"
|
||||
iconSvg={<DownloadSvg />}
|
||||
canLoading={true}
|
||||
isLoading={true}
|
||||
>
|
||||
isLoading
|
||||
</Button>{" "}
|
||||
<Button size="md" iconSvg={<DownloadSvg />} canLoading={true}>
|
||||
canLoading
|
||||
</Button>
|
||||
</IW>
|
||||
<IW>
|
||||
<Button size="lg">large</Button>
|
||||
<Button size="lg" iconSvg={<DownloadSvg />}>
|
||||
large
|
||||
</Button>
|
||||
<Button size="lg" iconSvg={<DownloadSvg />} isIconOnly={true}>
|
||||
large
|
||||
</Button>
|
||||
<Button
|
||||
size="lg"
|
||||
iconSvg={<DownloadSvg />}
|
||||
canLoading={true}
|
||||
isLoading={true}
|
||||
>
|
||||
isLoading
|
||||
</Button>{" "}
|
||||
<Button
|
||||
size="lg"
|
||||
iconSvg={<DownloadSvg />}
|
||||
canLoading={true}
|
||||
>
|
||||
canLoading
|
||||
</Button>
|
||||
</IW>
|
||||
<IW>
|
||||
<Button size="md" variant={"filled"} iconSvg={<DownloadSvg />}>
|
||||
filled
|
||||
</Button>
|
||||
<Button size="md" variant={"outline"} iconSvg={<DownloadSvg />}>
|
||||
outline
|
||||
</Button>
|
||||
<Button size="md" variant={"subtle"} iconSvg={<DownloadSvg />}>
|
||||
subtle
|
||||
</Button>
|
||||
<Button size="md" variant={"ghost"} iconSvg={<DownloadSvg />}>
|
||||
ghost
|
||||
</Button>
|
||||
</IW>
|
||||
</OW>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,15 @@
|
||||
import type { ReactNode } from "react";
|
||||
|
||||
export const IW = ({ children }: { children: ReactNode }) => {
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
gap: "10px",
|
||||
display: "flex",
|
||||
flexWrap: "nowrap",
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
import { StrictMode } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import "../src/index.css";
|
||||
import { App } from "./app.tsx";
|
||||
|
||||
createRoot(document.getElementById("root")!).render(
|
||||
<StrictMode>
|
||||
<App />
|
||||
</StrictMode>,
|
||||
);
|
||||
@@ -0,0 +1,17 @@
|
||||
import type { ReactNode } from "react";
|
||||
|
||||
export const OW = ({ children }: { children: ReactNode }) => {
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
margin: "20px",
|
||||
gap: "20px",
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
flexWrap: "nowrap",
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
import { Button } from "../src/components/button/button";
|
||||
import { Popover } from "../src/components/popover/popover";
|
||||
import { PopoverDropdown } from "../src/components/popover/popover-dropdown";
|
||||
import { PopoverTrigger } from "../src/components/popover/popover-trigger";
|
||||
import { IW } from "./iw";
|
||||
import { OW } from "./ow";
|
||||
|
||||
export const PopoverGallery = () => {
|
||||
return (
|
||||
<OW>
|
||||
<IW>
|
||||
<Popover>
|
||||
<PopoverTrigger>
|
||||
<Button>Open Popover</Button>
|
||||
</PopoverTrigger>
|
||||
<PopoverDropdown>
|
||||
This is Popover Content !
|
||||
</PopoverDropdown>
|
||||
</Popover>
|
||||
</IW>
|
||||
</OW>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user