Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
k70suK3-k06a7ash1 committed Feb 24, 2025
1 parent 734c1ae commit be2ab35
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 55 deletions.
6 changes: 2 additions & 4 deletions src/components/atoms/icon/ApplyTemplateIcon/index.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
import type { DispatchWithoutAction } from "react";
import { FileUp } from "lucide-react";
import { Spacer } from "../../Spacer";
import { IncludeIconButton } from "@/styles/IncludeIconButton";
import { Button } from "@/components/ui/button";
type Props = {
handleApply: DispatchWithoutAction;
};
export const ApplyTemplateIcon = ({ handleApply }: Props) => (
<IncludeIconButton>
<Button onClick={handleApply} type="button">
{/* biome-ignore lint/a11y/noLabelWithoutControl: <explanation> */}
<label className="cursor-pointer flex h-full items-center">
<i>
<FileUp className="text-xl" />
</i>
<Spacer horizontal size={4} />
<div>Apply the template</div>
<Button onClick={handleApply} type="button" className="hidden" />
</label>
</IncludeIconButton>
</Button>
);
15 changes: 5 additions & 10 deletions src/components/atoms/icon/BottomAddSectionIcon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,16 @@ import { Button } from "@/components/ui/button";
export const BottomAddSection = () => {
const { handleAddSection } = useAddSection();
return (
<div className="fixed bottom-0 left-0 w-full flex items-center justify-start bg-gray-100 rounded-md p-4">
<div>
<div>
<Spacer horizontal size={30} />
</div>
<div className="w-full">
<TabItem>
{/* biome-ignore lint/a11y/noLabelWithoutControl: <explanation> */}
<label className="cursor-pointer flex h-full items-center justify-center w-full box-border">
<i>
<PlusCircle className="text-xl" />
</i>
<Spacer horizontal size={4} />
<div>Add Section</div>
<Button onClick={handleAddSection} type="button" />
</label>
<PlusCircle className="text-xl" />

<div>Add Section</div>
<Button onClick={handleAddSection} />
</TabItem>
</div>
</div>
Expand Down
20 changes: 8 additions & 12 deletions src/components/atoms/icon/ClearIcon/index.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
import { Eraser } from "lucide-react";
import { Spacer } from "../../Spacer";
import { TabItem } from "../../../../styles/tabItem";
import { useMarkdownContext } from "@/context/MarkdownContext";
import { Button } from "@/components/ui/button";

export const ClearIcon = () => {
const { setMarkdown } = useMarkdownContext();

return (
<TabItem>
{/* biome-ignore lint/a11y/noLabelWithoutControl: <explanation> */}
<label className="cursor-pointer flex h-full items-center">
<i>
<Eraser className="text-xl" />
</i>
<Spacer horizontal size={4} />
<div>Clear</div>
<button onClick={() => setMarkdown([])} type="button" />
</label>
</TabItem>
<Button onClick={() => setMarkdown([])}>
<i>
<Eraser className="text-xl" />
</i>
<Spacer horizontal size={4} />
<div>Clear</div>
</Button>
);
};
21 changes: 9 additions & 12 deletions src/components/atoms/icon/TemplateIcon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { LanguageKey, SeparateLevelType } from "@/types";
import { languageAndReadmeMap } from "@/constants/languageAndReadmeMap";
import { useSplitByTag } from "@/hooks/useSplitByTag";
import { useMarkdownContext } from "@/context/MarkdownContext";
// import { Button } from "@/components/ui/button";
import { Button } from "@/components/ui/button";

export const TemplateSection = () => {
const { splitByTag } = useSplitByTag();
Expand Down Expand Up @@ -42,17 +42,14 @@ export const TemplateSection = () => {
<SetTemplateModal handleClose={close} handleApply={handleSetTemplate} />
</Modal> */}

<TabItem>
{/* biome-ignore lint/a11y/noLabelWithoutControl: <explanation> */}
<label className="cursor-pointer flex h-full items-center">
<i>
<FileText className="text-xl" />
</i>
<Spacer horizontal size={4} />
<div>Use Template</div>
{/* <Button onClick={open} type="button" /> */}
</label>
</TabItem>
{/* biome-ignore lint/a11y/noLabelWithoutControl: <explanation> */}
<Button>
<i>
<FileText className="text-xl" />
</i>
<Spacer horizontal size={4} />
<div>Use Template</div>
</Button>
</>
);
};
10 changes: 5 additions & 5 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ body {
--chart-3: oklch(0.398 0.07 227.392);
--chart-4: oklch(0.828 0.189 84.429);
--chart-5: oklch(0.769 0.188 70.08);
--radius: 0.625rem;;
--radius: 0.625rem;
--sidebar: oklch(0.985 0 0);
--sidebar-foreground: oklch(0.145 0 0);
--sidebar-primary: oklch(0.205 0 0);
Expand Down Expand Up @@ -131,10 +131,10 @@ body {
}

@layer base {
* {
@apply border-border outline-ring/50;
* {
@apply border-border outline-ring/50;
}
body {
@apply bg-background text-foreground;
body {
@apply bg-background text-foreground;
}
}
6 changes: 0 additions & 6 deletions src/styles/IncludeIconButton/index.tsx

This file was deleted.

6 changes: 0 additions & 6 deletions src/styles/tabItem/index.tsx

This file was deleted.

0 comments on commit be2ab35

Please sign in to comment.