Skip to content

Commit

Permalink
Merge pull request #29 from Azure-Samples/gk/26-aggregate-miyagi-skil…
Browse files Browse the repository at this point in the history
…ls-into-a-notebook

add personalize drawer
  • Loading branch information
thegovind committed Apr 21, 2023
2 parents 06107ae + e38bd97 commit 3b7a72d
Show file tree
Hide file tree
Showing 11 changed files with 398 additions and 14 deletions.
Binary file modified ancillary/images/embeddings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions services/frontend/src/components/accounts/link-accounts.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
import cn from 'classnames';
import Button from '@/components/ui/button';
import {useModal} from '@/components/modal-views/context';
import {usePersonalizeDrawer} from "@/components/personalize/personalize-context";

export default function LinkAccounts({
btnClassName}: {
btnClassName?: string;
anchorClassName?: string;
}) {
const { openModal } = useModal();
const { openPersonalize } = usePersonalizeDrawer();
return (
<>
<Button
onClick={() => openModal('LINK_ACCOUNTS_VIEW')}
onClick={openPersonalize}
className={cn('shadow-main hover:shadow-large', btnClassName)}
>
Link Accounts
Personalize
</Button>
</>
);
Expand Down
25 changes: 25 additions & 0 deletions services/frontend/src/components/icons/close.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
export function Close(props: React.SVGAttributes<{}>) {
return (
<svg
width="10"
height="10"
viewBox="0 0 10 10"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path
d="M1.46445 8.53542L8.53552 1.46436"
stroke="currentColor"
strokeWidth="1.5"
strokeLinecap="round"
/>
<path
d="M1.46446 1.46458L8.53552 8.53564"
stroke="currentColor"
strokeWidth="1.5"
strokeLinecap="round"
/>
</svg>
);
}
18 changes: 18 additions & 0 deletions services/frontend/src/components/icons/horizontal-three-dots.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export default function HorizontalThreeDots() {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth={1.5}
stroke="currentColor"
className="h-6 w-6"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M6.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM12.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM18.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0z"
/>
</svg>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { atom, useAtom } from 'jotai';

const personalizeDrawerAtom = atom(false);
export function usePersonalizeDrawer() {
const [isPersonalizeOpen, setPersonalizeOpen] = useAtom(personalizeDrawerAtom);
const openPersonalize = () => setPersonalizeOpen(true);
const closePersonalize = () => setPersonalizeOpen(false);
return {
isPersonalizeOpen,
openPersonalize,
closePersonalize,
};
}
Loading

0 comments on commit 3b7a72d

Please sign in to comment.