diff --git a/app/pages/project/instances/InstancesPage.tsx b/app/pages/project/instances/InstancesPage.tsx
index c1bcd6f01c..2c981a7e84 100644
--- a/app/pages/project/instances/InstancesPage.tsx
+++ b/app/pages/project/instances/InstancesPage.tsx
@@ -11,10 +11,12 @@ import {
useQueryTable,
} from '@oxide/table'
import {
+ Button,
EmptyMessage,
Instances24Icon,
PageHeader,
PageTitle,
+ Refresh16Icon,
TableActions,
buttonStyle,
} from '@oxide/ui'
@@ -76,10 +78,7 @@ export function InstancesPage() {
const { Table, Column } = useQueryTable(
'instanceList',
{ path: projectParams },
- {
- refetchInterval: 5000,
- keepPreviousData: true,
- }
+ { keepPreviousData: true }
)
if (!instances) return null
@@ -90,6 +89,9 @@ export function InstancesPage() {
}>Instances
+
= {
sm: 'h-8 px-3 text-mono-sm svg:w-4',
+ // meant for buttons that only contain a single icon
+ icon: 'h-8 w-8 text-mono-sm svg:w-4',
base: 'h-10 px-3 text-mono-md svg:w-5',
}
@@ -70,7 +72,17 @@ type ButtonStyleProps = {
color?: Color
}
-export type ButtonProps = React.ComponentPropsWithRef<'button'> &
+export type ButtonProps = Pick<
+ React.ComponentProps<'button'>,
+ | 'className'
+ | 'onClick'
+ | 'aria-disabled'
+ | 'disabled'
+ | 'children'
+ | 'type'
+ | 'title'
+ | 'form'
+> &
ButtonStyleProps & {
innerClassName?: string
loading?: boolean
@@ -106,6 +118,7 @@ const noop: MouseEventHandler = (e) => {
export const Button = forwardRef(
(
{
+ type = 'button',
children,
size,
variant,
@@ -116,7 +129,8 @@ export const Button = forwardRef(
disabled,
onClick,
'aria-disabled': ariaDisabled,
- ...rest
+ form,
+ title,
},
ref
) => {
@@ -126,11 +140,12 @@ export const Button = forwardRef(
'visually-disabled': disabled,
})}
ref={ref}
- type="button"
+ type={type}
onMouseDown={disabled ? noop : undefined}
onClick={disabled ? noop : onClick}
aria-disabled={disabled || ariaDisabled}
- {...rest}
+ form={form}
+ title={title}
>
<>
{loading && }
diff --git a/libs/ui/lib/button/button.css b/libs/ui/lib/button/button.css
index 303397e3ca..aa1ed82d07 100644
--- a/libs/ui/lib/button/button.css
+++ b/libs/ui/lib/button/button.css
@@ -38,7 +38,7 @@
* Ghost
*/
.btn-primary-ghost {
- @apply border text-accent border-accent-tertiary hover:bg-accent-secondary disabled:bg-transparent;
+ @apply border text-secondary border-default hover:bg-hover disabled:bg-transparent;
}
/* Removing `-ghost` so this version is default `btn-secondary` */