Skip to content

Commit

Permalink
Add flyout component
Browse files Browse the repository at this point in the history
  • Loading branch information
vineethasok committed Oct 16, 2023
1 parent c98b494 commit e9dcffe
Show file tree
Hide file tree
Showing 6 changed files with 410 additions and 7 deletions.
169 changes: 169 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"@radix-ui/react-avatar": "^1.0.3",
"@radix-ui/react-checkbox": "^1.0.4",
"@radix-ui/react-context-menu": "^2.1.4",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.5",
"@radix-ui/react-hover-card": "^1.0.6",
"@radix-ui/react-popover": "^1.0.6",
Expand Down
46 changes: 39 additions & 7 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState } from "react";
import { useRef, useState } from "react";

import "@/styles/globals.css";
import "./styles/variables.css";
Expand Down Expand Up @@ -28,13 +28,16 @@ import {
Tabs,
WarningAlert,
CardPrimary,
Flyout,
Select,
} from "@/components";

const App = () => {
const [currentTheme, setCurrentTheme] = useState<ThemeName>("dark");
const [selectedButton, setSelectedButton] = useState(0);
const [checked, setChecked] = useState(false);
const [disabled] = useState(false);
const ref = useRef(null);

return (
<ClickUIProvider
Expand All @@ -59,17 +62,46 @@ const App = () => {
onClick={() => console.log("click")}
/>
</div>
<div className={styles.flexWrap}>
<IconButton
icon="user"
size="sm"
onClick={() => console.log("click")}
/>
<div
className={styles.flexWrap}
ref={ref}
>
<IconButton
icon="user"
size="sm"
onClick={() => console.log("click")}
/>
<Flyout>
<Flyout.Trigger>
<IconButton
icon="user"
size="sm"
onClick={() => console.log("click")}
/>
</Flyout.Trigger>
<Flyout.Content container={ref.current}>
<Flyout.Header
title="test1"
description="test2"
/>
<Flyout.Body>
hadksjhadksjhaskdjhaksdjhkajsdhkajshdkjashdkjashd
<Select>
<Select.Item value="test">test</Select.Item>
<Select.Item value="test2">test2</Select.Item>
<Select.Item value="test3">test3</Select.Item>
<Select.Item value="test4">test4</Select.Item>
<Select.Item value="test5">test5</Select.Item>
<Select.Item value="test6">test6</Select.Item>
<Select.Item value="test7">test7</Select.Item>
<Select.Item value="test8">test8</Select.Item>
</Select>
</Flyout.Body>
<Flyout.Footer>
<Button type="primary">Primary Button</Button>
</Flyout.Footer>
</Flyout.Content>
</Flyout>
<IconButton
icon="user"
size="sm"
Expand Down
Empty file.
Loading

0 comments on commit e9dcffe

Please sign in to comment.