diff --git a/web/src/app/app/settings/(permissions)/users/[userId]/_LayoutHeaderAndSegment/UsersBackButton.tsx b/web/src/app/app/settings/(permissions)/users/[userId]/_LayoutHeaderAndSegment/UsersBackButton.tsx
index 2b4ea18d3..db87a706e 100644
--- a/web/src/app/app/settings/(permissions)/users/[userId]/_LayoutHeaderAndSegment/UsersBackButton.tsx
+++ b/web/src/app/app/settings/(permissions)/users/[userId]/_LayoutHeaderAndSegment/UsersBackButton.tsx
@@ -4,9 +4,7 @@ import { BackButton } from '@/components/ui';
import { createBusterRoute, BusterRoutes } from '@/routes/busterRoutes';
import { useMemo } from 'react';
-export const UsersBackButton = ({}: {}) => {
- //const previousRoute = useAppLayoutContextSelector((state) => state.previousRoute);
-
+export const UsersBackButton = () => {
const {
route,
text
diff --git a/web/src/components/ui/buttons/AppButtonSelect.tsx b/web/src/components/ui/buttons/AppButtonSelect.tsx
deleted file mode 100644
index cf32b2573..000000000
--- a/web/src/components/ui/buttons/AppButtonSelect.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import { Button, ButtonProps } from 'antd';
-import { createStyles } from 'antd-style';
-import React, { PropsWithChildren } from 'react';
-
-const useStyles = createStyles(({ css, token }) => ({
- selected: {
- background: token.colorBgContainerDisabled
- }
-}));
-
-export const AppButtonSelect: React.FC<
- PropsWithChildren<
- ButtonProps & {
- selected?: boolean;
- }
- >
-> = ({ children, selected, ...props }) => {
- const { cx, styles } = useStyles();
-
- return (
-
- );
-};
diff --git a/web/src/components/ui/buttons/BackButton.stories.tsx b/web/src/components/ui/buttons/BackButton.stories.tsx
new file mode 100644
index 000000000..40499860b
--- /dev/null
+++ b/web/src/components/ui/buttons/BackButton.stories.tsx
@@ -0,0 +1,68 @@
+import type { Meta, StoryObj } from '@storybook/react';
+import { BackButton } from './BackButton';
+
+const meta: Meta = {
+ title: 'Base/Buttons/BackButton',
+ component: BackButton,
+ tags: ['autodocs'],
+ argTypes: {
+ text: {
+ control: 'text',
+ description: 'The text to display in the button'
+ },
+ className: {
+ control: 'text',
+ description: 'Additional CSS classes to apply'
+ },
+ onClick: {
+ action: 'clicked',
+ description: 'Function to call when the button is clicked'
+ },
+ linkUrl: {
+ control: 'text',
+ description: 'URL to navigate to when clicked (uses Next.js Link)'
+ },
+ style: {
+ control: 'object',
+ description: 'Additional inline styles to apply'
+ }
+ }
+};
+
+export default meta;
+type Story = StoryObj;
+
+export const Default: Story = {
+ args: {
+ text: 'Back'
+ }
+};
+
+export const CustomText: Story = {
+ args: {
+ text: 'Go Back'
+ }
+};
+
+export const WithLink: Story = {
+ args: {
+ text: 'Back to Home',
+ linkUrl: '/'
+ }
+};
+
+export const WithCustomStyle: Story = {
+ args: {
+ text: 'Back',
+ style: {
+ color: 'blue'
+ }
+ }
+};
+
+export const WithCustomClass: Story = {
+ args: {
+ text: 'Back',
+ className: 'font-bold'
+ }
+};
diff --git a/web/src/components/ui/buttons/BackButton.tsx b/web/src/components/ui/buttons/BackButton.tsx
index 5e801a09f..85b2182ad 100644
--- a/web/src/components/ui/buttons/BackButton.tsx
+++ b/web/src/components/ui/buttons/BackButton.tsx
@@ -1,9 +1,9 @@
'use client';
import React from 'react';
-import { AppMaterialIcons } from '../icons';
-import { createStyles } from 'antd-style';
import { Title } from '../text';
import Link from 'next/link';
+import { ChevronLeft } from '../icons';
+import { Button } from './Button';
interface BackButtonProps {
onClick?: () => void;
@@ -11,37 +11,21 @@ interface BackButtonProps {
size?: 'medium' | 'large';
className?: string;
style?: React.CSSProperties;
- type?: 'default' | 'secondary' | 'tertiary';
linkUrl?: string;
}
export const BackButton: React.FC = React.memo(
- ({
- onClick,
- text = 'Back',
- size = 'medium',
- className = '',
- style,
- type = 'secondary',
- linkUrl
- }) => {
- const { styles, cx } = useStyles();
- const titleSize = size === 'large' ? 4 : 5;
-
+ ({ onClick, text = 'Back', className = '', style, linkUrl }) => {
return (
-
+ }
+ variant="link"
+ onClick={onClick}
+ className={className}
+ style={style}>
+ {text}
+
);
}
@@ -49,20 +33,38 @@ export const BackButton: React.FC = React.memo(
BackButton.displayName = 'BackButton';
-const LinkWrapper = ({ children, linkUrl }: { children: React.ReactNode; linkUrl?: string }) => {
+const LinkWrapper: React.FC<{ children: React.ReactNode; linkUrl?: string }> = ({
+ children,
+ linkUrl
+}) => {
if (linkUrl) {
return {children};
}
return <>{children}>;
};
-const useStyles = createStyles(({ css, token }) => ({
- icon: {
- color: token.colorIcon
- },
- container: css`
- &:hover {
- color: ${token.colorText};
- }
- `
-}));
+// const useStyles = createStyles(({ css, token }) => ({
+// icon: {
+// color: token.colorIcon
+// },
+// container: css`
+// &:hover {
+// color: ${token.colorText};
+// }
+// `
+// }));
+
+{
+ /* */
+}