Skip to content

Full width tables #1474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 89 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
457a29c
Updated styling
samejr Oct 24, 2024
edba9c1
Updated the main Table component styles to the new design
samejr Oct 25, 2024
893874b
Run page table layout style updates
samejr Oct 25, 2024
3c90d9b
Updated row styling and new scrolling behaviour
samejr Oct 25, 2024
a02df2c
Fixed bulk action bar no appearing
samejr Oct 25, 2024
ec37ba4
Improved table component styles
samejr Oct 25, 2024
564bdbf
Pagination arrows now chevrons
samejr Oct 25, 2024
6d445c3
Added link to Runs docs page
samejr Oct 25, 2024
671a554
Small popover tweak
samejr Oct 26, 2024
7ecf336
Moved the extra Test button out of Tables and into the RunsTable
samejr Oct 26, 2024
c9ffd21
WIP refactoring the sticky table cell
samejr Oct 29, 2024
5063d61
Support for the existing way we have menus in the sticky table cells
samejr Oct 29, 2024
a57188e
Created a specific Docs style button
samejr Oct 29, 2024
72e727c
Improved dialog trigger button styles
samejr Oct 29, 2024
18ba2ef
Improved docs button styles
samejr Oct 29, 2024
51741c7
Updated Docs buttons to the new style in the tooltips
samejr Oct 29, 2024
3373f34
Adding a Test button on hover
samejr Oct 30, 2024
92aa8f7
Removed the page padding and made table scroll
samejr Oct 30, 2024
36497f0
Fixed table scrolling
samejr Oct 30, 2024
f4cba71
cleaned up imports
samejr Oct 31, 2024
1574e69
WIP adding a test button that links to the test page
samejr Oct 31, 2024
37d489b
added a docs button to the header
samejr Oct 31, 2024
1a6e10b
Much nicer display bar for showing how many schedules you have (and i…
samejr Oct 31, 2024
4ff5ebb
Fixed the button types in the schedules info panel
samejr Oct 31, 2024
85a6931
Fixed button icon colour
samejr Oct 31, 2024
ef3fda6
Removed the pagination as it’s not being used
samejr Oct 31, 2024
15609b2
Delete modal button position updated
samejr Nov 1, 2024
4525993
Fixed padding on recent payloads panel
samejr Nov 1, 2024
e882c4e
Fixed button icon colours
samejr Nov 1, 2024
2addde1
Better style for active table row
samejr Nov 1, 2024
6c6f865
Table scrolling now behaves properly
samejr Nov 1, 2024
e296158
environment buttons now have a hover state
samejr Nov 1, 2024
515e573
Bigger Run test bar to match the Run page
samejr Nov 1, 2024
2e299e2
Small layout fixes to the schedule side panel
samejr Nov 2, 2024
8385a34
Test page now has link to docs
samejr Nov 2, 2024
4aacf7d
fixed text alignment with table headers
samejr Nov 2, 2024
ba2ee10
API keys page now has full width tables
samejr Nov 2, 2024
95b4d42
Fix typo and modal layout
samejr Nov 2, 2024
a553a9f
Table uses new sticky button type
samejr Nov 2, 2024
970787f
Tidy imports
samejr Nov 2, 2024
7f561f4
Env var table now full width
samejr Nov 2, 2024
424c0ca
Form buttons have a border top
samejr Nov 2, 2024
dbacd43
Updated button styles
samejr Nov 2, 2024
d921c04
Updated blank state message style to be consistent
samejr Nov 2, 2024
5869cb7
Removed unnecessary form button border
samejr Nov 2, 2024
e64cca2
Alerts page tables now full width
samejr Nov 2, 2024
5e18441
Allowing the Detail cell to be styled
samejr Nov 2, 2024
21536bb
Updated the page structure to be the same as the scheduled page – wit…
samejr Nov 2, 2024
b6d8682
Concurrency limits page now full width
samejr Nov 2, 2024
26c20de
Fixed function name label extending too far
samejr Nov 2, 2024
76c2d1d
Improved the button sizes on the replay modal
samejr Nov 2, 2024
819df8f
Added a minimal style to the info panels
samejr Nov 2, 2024
6861039
Make sure you can always see the info and unlock staging info when th…
samejr Nov 2, 2024
b9e21a1
Info panel style updated to match the others
samejr Nov 2, 2024
9c5b320
Removed the duplicate header
samejr Nov 2, 2024
a8852df
Usage page tables now full width
samejr Nov 2, 2024
4d41ab5
Personal access token page using full width tables
samejr Nov 3, 2024
1e9714b
Small CSS fixes
samejr Nov 3, 2024
a4cb657
Deployments page table now full width
samejr Nov 3, 2024
39db0e2
Deploy page scrolls properly and pagination stays on screen if table …
samejr Nov 3, 2024
4dd6dcd
TableCellMenu using the correct popover
samejr Nov 3, 2024
0d7f533
Added missing button variant
samejr Nov 3, 2024
c2145ae
Button group is now named so it doesn’t cause conflicts
samejr Nov 3, 2024
98575a0
Added docs link to the Run page
samejr Nov 3, 2024
29321a2
Typo
samejr Nov 3, 2024
af9c439
Added a link to the test page if you have no runs
samejr Nov 3, 2024
3fe3792
Make the table sticky cell buttons more obvious
samejr Nov 6, 2024
e6de253
Env var page now using the new popover menu
samejr Nov 6, 2024
ce442b1
Improved the menu items
samejr Nov 6, 2024
bf9115d
Copy tweak
samejr Nov 6, 2024
a20136e
Made the icons bright on hover
samejr Nov 6, 2024
afa5636
Updated the cancel run dialog
samejr Nov 6, 2024
ac162ec
Improved the API keys sticky menu behaviour
samejr Nov 6, 2024
58515aa
Alerts table menu using the new popover
samejr Nov 6, 2024
0069b71
Correct sized buttons in the Env Var page table menu
samejr Nov 7, 2024
eabeadd
Fixed weird Dialog text styling
samejr Nov 7, 2024
cc76688
Schedules page blank state using correct docs button style
samejr Nov 7, 2024
638f959
Copy tweak
samejr Nov 7, 2024
2a8fa93
Menu buttons styled correctly
samejr Nov 7, 2024
7f993c2
Added close buttons to the deploy dialogs
samejr Nov 7, 2024
3092406
Made the Dialog footer match the Form footer style
samejr Nov 7, 2024
4db88cc
Fixed feedback form buttons
samejr Nov 7, 2024
87c7eb9
Fixed cancel run dialog
samejr Nov 7, 2024
19aa804
Merge remote-tracking branch 'origin/main' into full-width-tables
matt-aitken Nov 15, 2024
4c2890a
Test page uses the taskIdentifier in the path
matt-aitken Nov 15, 2024
9dfa995
Test task button working
matt-aitken Nov 15, 2024
63be29f
Added Spline component for 404 logo to remove spline logo
samejr Nov 16, 2024
c39ee74
Removed todo comment
samejr Nov 18, 2024
d9bdc94
Added a docs button to the PAT page
samejr Nov 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions apps/webapp/app/components/ErrorDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { friendlyErrorDisplay } from "~/utils/httpErrors";
import { LinkButton } from "./primitives/Buttons";
import { Header1 } from "./primitives/Headers";
import { Paragraph } from "./primitives/Paragraph";
import Spline from "@splinetool/react-spline";

type ErrorDisplayOptions = {
button?: {
Expand Down Expand Up @@ -55,18 +56,13 @@ export function ErrorDisplay({ title, message, button }: DisplayOptionsProps) {
{button ? button.title : "Go to homepage"}
</LinkButton>
</div>
<div className="pointer-events-none absolute bottom-4 right-4 z-10 h-[70px] w-[200px] bg-[rgb(24,26,30)]" />
<motion.div
className="pointer-events-none absolute inset-0 overflow-hidden"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ delay: 0.5, duration: 2, ease: "easeOut" }}
>
<iframe
src="https://my.spline.design/untitled-a6f70b5ebc46bdb2dcc0f21d5397e8ac/"
className="pointer-events-none absolute inset-0 h-full w-full object-cover"
style={{ border: "none" }}
/>
<Spline scene="https://prod.spline.design/wRly8TZN-e0Twb8W/scene.splinecode" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Based on the gathered information, I can now provide the final response:

Spline scene implementation needs error handling and loading states

The current implementation in ErrorDisplay.tsx lacks proper error handling and loading states for the Spline scene. While the component is wrapped in a motion.div for animation, it should:

  • Use the existing error boundary pattern (found in multiple route files) to handle Spline loading failures
  • Add a loading state since the scene is rendered immediately without any indication of loading progress
  • Consider that this is used in an error display component, so the fallback should be minimal and not impact the error message visibility

Example locations requiring attention:

  • apps/webapp/app/components/ErrorDisplay.tsx: Add error boundary and loading state for Spline scene
  • Consider moving the scene file to a local asset to prevent external dependencies in an error display component
🔗 Analysis chain

Consider security and reliability improvements for the Spline scene.

The direct loading of a remote Spline scene raises several concerns:

  1. Security: Loading remote content could pose security risks. Consider hosting the scene file locally or implementing Content Security Policy (CSP) headers.
  2. Error Handling: Add error boundaries or fallback content in case the scene fails to load.
  3. Performance: Consider implementing lazy loading or a loading state for better user experience.
  4. Accessibility: Ensure screen readers can provide appropriate context for this decorative content.

Let's verify the usage of Spline across the codebase:


Let me gather more information about error handling and loading states in the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for other Spline implementations and error handling patterns

# Check for other Spline usages
echo "Checking for other Spline implementations..."
rg -l "@splinetool/react-spline"

# Check for error boundary implementations that might be reusable
echo "Checking for existing error boundary patterns..."
ast-grep --pattern 'class $_ extends React.Component {
  $$$
  componentDidCatch($$$) {
    $$$
  }
  $$$
}'

Length of output: 433


Script:

#!/bin/bash
# Check for error boundary implementations and loading states

# Look for error boundary components
echo "Checking for error boundary components..."
rg -l "ErrorBoundary"

# Check the ErrorDisplay component implementation
echo "Checking ErrorDisplay.tsx content..."
cat "apps/webapp/app/components/ErrorDisplay.tsx"

# Look for loading state patterns
echo "Checking for loading state implementations..."
rg -l "Suspense|React.lazy|loading"

# Check for CSP configurations
echo "Checking for CSP configurations..."
rg -l "Content-Security-Policy"

Length of output: 6489

</motion.div>
</div>
);
Expand Down
23 changes: 13 additions & 10 deletions apps/webapp/app/components/Feedback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { Paragraph } from "./primitives/Paragraph";
import { Select, SelectItem } from "./primitives/Select";
import { TextArea } from "./primitives/TextArea";
import { TextLink } from "./primitives/TextLink";
import { DialogClose } from "@radix-ui/react-dialog";

type FeedbackProps = {
button: ReactNode;
Expand Down Expand Up @@ -120,16 +121,18 @@ export function Feedback({ button, defaultValue = "bug" }: FeedbackProps) {
<FormError id={message.errorId}>{message.error}</FormError>
</InputGroup>
<FormError>{form.error}</FormError>
<div className="flex w-full justify-end">
<FormButtons
className="m-0 w-max"
confirmButton={
<Button type="submit" variant="tertiary/medium">
Send message
</Button>
}
/>
</div>
<FormButtons
confirmButton={
<Button type="submit" variant="primary/medium">
Send message
</Button>
}
cancelButton={
<DialogClose asChild>
<Button variant="tertiary/medium">Cancel</Button>
</DialogClose>
}
/>
</Fieldset>
</Form>
</div>
Expand Down
4 changes: 2 additions & 2 deletions apps/webapp/app/components/ListPagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function NextButton({ cursor }: { cursor?: string }) {
<LinkButton
to={path ?? "#"}
variant={"minimal/small"}
TrailingIcon="arrow-right"
TrailingIcon="chevron-right"
trailingIconClassName="text-text-dimmed"
className={cn(
"flex items-center",
Expand All @@ -47,7 +47,7 @@ function PreviousButton({ cursor }: { cursor?: string }) {
<LinkButton
to={path ?? "#"}
variant={"minimal/small"}
LeadingIcon="arrow-left"
LeadingIcon="chevron-left"
leadingIconClassName="text-text-dimmed"
className={cn(
"flex items-center",
Expand Down
34 changes: 17 additions & 17 deletions apps/webapp/app/components/environments/RegenerateApiKeyModal.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
import { ArrowPathIcon, ArrowRightIcon } from "@heroicons/react/20/solid";
import { ExclamationTriangleIcon } from "@heroicons/react/24/solid";
import { ArrowPathIcon } from "@heroicons/react/20/solid";
import { useFetcher } from "@remix-run/react";
import { useState } from "react";
import { Dialog, DialogContent, DialogHeader, DialogTrigger } from "~/components/primitives/Dialog";
import { generateTwoRandomWords } from "~/utils/randomWords";
import { Button } from "../primitives/Buttons";
import { Header1 } from "../primitives/Headers";
import { Input } from "../primitives/Input";
import { Paragraph } from "../primitives/Paragraph";
import { Spinner } from "../primitives/Spinner";
import { Callout } from "../primitives/Callout";
import { Fieldset } from "../primitives/Fieldset";
import { InputGroup } from "../primitives/InputGroup";
import { FormButtons } from "../primitives/FormButtons";
import { Input } from "../primitives/Input";
import { InputGroup } from "../primitives/InputGroup";
import { Paragraph } from "../primitives/Paragraph";
import { Spinner } from "../primitives/Spinner";

type ModalProps = {
id: string;
Expand All @@ -31,15 +29,17 @@ export function RegenerateApiKeyModal({ id, title }: ModalProps) {
<Dialog open={open} onOpenChange={setOpen}>
<DialogTrigger asChild>
<Button
variant="minimal/small"
leadingIconClassName="text-text-dimmed"
variant="small-menu-item"
fullWidth
textAlignLeft
leadingIconClassName="text-success"
LeadingIcon={ArrowPathIcon}
>
Regenerate
Regenerate
</Button>
</DialogTrigger>
<DialogContent>
<DialogHeader>{`Regenerate ${title} Environment Key`}</DialogHeader>
<DialogHeader>{`Regenerate ${title.toUpperCase()} environment key`}</DialogHeader>
<RegenerateApiKeyModalContent
id={id}
title={title}
Expand All @@ -62,18 +62,18 @@ const RegenerateApiKeyModalContent = ({ id, randomWord, title, closeModal }: Mod
}

return (
<div className="flex flex-col items-center gap-y-5 py-4">
<div className="flex flex-col items-center gap-y-4 pt-4">
<Callout variant="warning">
{`Regenerating the keys for this environment will temporarily break any live Jobs in the
${title} Environmentuntil the new API keys are set in the relevant environment variables.`}
{`Regenerating the keys for this environment will temporarily break any live tasks in the
${title} environment until the new API keys are set in the relevant environment variables.`}
</Callout>
<fetcher.Form
method="post"
action={`/resources/environments/${id}/regenerate-api-key`}
className="mt-2 w-full"
>
<Fieldset className="w-full">
<InputGroup>
<InputGroup className="max-w-full">
<Paragraph variant="small/bright">Enter this text below to confirm:</Paragraph>
<Paragraph
variant="small"
Expand All @@ -93,14 +93,14 @@ const RegenerateApiKeyModalContent = ({ id, randomWord, title, closeModal }: Mod
confirmButton={
<Button
type="submit"
variant={"primary/small"}
variant={"primary/medium"}
LeadingIcon={isSubmitting ? Spinner : undefined}
disabled={confirmationText !== randomWord}
>
Regenerate
</Button>
}
cancelButton={<Button variant={"tertiary/small"}>Cancel</Button>}
cancelButton={<Button variant={"tertiary/medium"}>Cancel</Button>}
/>
</Fieldset>
</fetcher.Form>
Expand Down
86 changes: 57 additions & 29 deletions apps/webapp/app/components/primitives/Buttons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,40 +41,53 @@ type Size = keyof typeof sizes;
const theme = {
primary: {
textColor:
"text-charcoal-900 group-hover:text-charcoal-900 transition group-disabled:text-charcoal-900",
"text-charcoal-900 group-hover/button:text-charcoal-900 transition group-disabled/button:text-charcoal-900",
button:
"bg-primary group-hover:bg-apple-200 group-disabled:opacity-50 group-disabled:bg-primary group-disabled:pointer-events-none",
"bg-primary group-hover/button:bg-apple-200 group-disabled/button:opacity-50 group-disabled/button:bg-primary group-disabled/button:pointer-events-none",
shortcut:
"border-black/40 text-charcoal-900 group-hover:border-black/60 group-hover:text-charcoal-900",
"border-black/40 text-charcoal-900 group-hover/button:border-black/60 group-hover/button:text-charcoal-900",
icon: "text-charcoal-900",
},
secondary: {
textColor: "text-text-bright transition group-disabled:text-text-dimmed/80",
textColor: "text-text-bright transition group-disabled/button:text-text-dimmed/80",
button:
"bg-secondary group-hover:bg-charcoal-600 group-hover:border-charcoal-650 border border-charcoal-600 group-disabled:bg-secondary group-disabled:opacity-60 group-disabled:pointer-events-none",
"bg-secondary group-hover/button:bg-charcoal-600 group-hover/button:border-charcoal-650 border border-charcoal-600 group-disabled/button:bg-secondary group-disabled/button:opacity-60 group-disabled/button:pointer-events-none",
shortcut:
"border-text-dimmed/40 text-text-dimmed group-hover:text-text-bright group-hover:border-text-dimmed",
"border-text-dimmed/40 text-text-dimmed group-hover/button:text-text-bright group-hover/button:border-text-dimmed",
icon: "text-text-bright",
},
tertiary: {
textColor: "text-text-bright transition group-disabled:text-text-dimmed/80",
textColor: "text-text-bright transition group-disabled/button:text-text-dimmed/80",
button:
"bg-tertiary group-hover:bg-charcoal-600 group-disabled:bg-tertiary group-disabled:opacity-60 group-disabled:pointer-events-none",
"bg-tertiary group-hover/button:bg-charcoal-600 group-disabled/button:bg-tertiary group-disabled/button:opacity-60 group-disabled/button:pointer-events-none",
shortcut:
"border-text-dimmed/40 text-text-dimmed group-hover:text-text-bright group-hover:border-text-dimmed",
"border-text-dimmed/40 text-text-dimmed group-hover/button:text-text-bright group-hover/button:border-text-dimmed",
icon: "text-text-bright",
},
minimal: {
textColor:
"text-text-dimmed group-hover:text-text-bright transition group-disabled:text-text-dimmed/80",
"text-text-dimmed group-hover/button:text-text-bright transition group-disabled/button:text-text-dimmed/80",
button:
"bg-transparent group-hover:bg-tertiary disabled:opacity-50 group-disabled:bg-transparent group-disabled:pointer-events-none",
"bg-transparent group-hover/button:bg-tertiary disabled:opacity-50 group-disabled/button:bg-transparent group-disabled/button:pointer-events-none",
shortcut:
"border-dimmed/40 text-text-dimmed group-hover:text-text-bright/80 group-hover:border-dimmed/60",
"border-dimmed/40 text-text-dimmed group-hover/button:text-text-bright/80 group-hover/button:border-dimmed/60",
icon: "text-text-dimmed",
},
danger: {
textColor:
"text-text-bright group-hover:text-white transition group-disabled:text-text-bright/80",
"text-text-bright group-hover/button:text-white transition group-disabled/button:text-text-bright/80",
button:
"bg-error group-hover:bg-rose-500 disabled:opacity-50 group-disabled:bg-error group-disabled:pointer-events-none",
shortcut: "border-text-bright text-text-bright group-hover:border-bright/60",
"bg-error group-hover/button:bg-rose-500 disabled:opacity-50 group-disabled/button:bg-error group-disabled/button:pointer-events-none",
shortcut: "border-text-bright text-text-bright group-hover/button:border-bright/60",
icon: "text-text-bright",
},
docs: {
textColor: "text-blue-200/70 transition group-disabled/button:text-text-dimmed/80",
button:
"bg-charcoal-700 border border-charcoal-600/50 shadow group-hover/button:bg-charcoal-650 group-disabled/button:bg-tertiary group-disabled/button:opacity-60 group-disabled/button:pointer-events-none",
shortcut:
"border-text-dimmed/40 text-text-dimmed group-hover/button:text-text-bright group-hover/button:border-text-dimmed",
icon: "text-blue-500",
},
};

Expand All @@ -84,7 +97,7 @@ function createVariant(sizeName: Size, themeName: Theme) {
return {
textColor: theme[themeName].textColor,
button: cn(sizes[sizeName].button, theme[themeName].button),
icon: sizes[sizeName].icon,
icon: cn(sizes[sizeName].icon, theme[themeName].icon),
iconSpacing: sizes[sizeName].iconSpacing,
shortcutVariant: sizes[sizeName].shortcutVariant,
shortcut: cn(sizes[sizeName].shortcut, theme[themeName].shortcut),
Expand Down Expand Up @@ -112,9 +125,14 @@ const variant = {
"danger/medium": createVariant("medium", "danger"),
"danger/large": createVariant("large", "danger"),
"danger/extra-large": createVariant("extra-large", "danger"),
"docs/small": createVariant("small", "docs"),
"docs/medium": createVariant("medium", "docs"),
"docs/large": createVariant("large", "docs"),
"docs/extra-large": createVariant("extra-large", "docs"),
"menu-item": {
textColor: "text-text-bright px-1",
button: "h-9 px-[0.475rem] text-sm rounded-sm bg-transparent group-hover:bg-charcoal-750",
button:
"h-9 px-[0.475rem] text-sm rounded-sm bg-transparent group-hover/button:bg-charcoal-750",
icon: "h-5",
iconSpacing: "gap-x-0.5",
shortcutVariant: undefined,
Expand All @@ -123,7 +141,7 @@ const variant = {
"small-menu-item": {
textColor: "text-text-bright",
button:
"h-[1.8rem] px-[0.4rem] text-2sm rounded-sm text-text-dimmed bg-transparent group-hover:bg-charcoal-750",
"h-[1.8rem] px-[0.4rem] text-2sm rounded-sm text-text-dimmed bg-transparent group-hover/button:bg-charcoal-750",
icon: "h-4",
iconSpacing: "gap-x-1.5",
shortcutVariant: undefined,
Expand All @@ -132,7 +150,7 @@ const variant = {
"small-menu-sub-item": {
textColor: "text-text-dimmed",
button:
"h-[1.8rem] px-[0.5rem] ml-5 text-2sm rounded-sm text-text-dimmed bg-transparent group-hover:bg-charcoal-750 focus-custom",
"h-[1.8rem] px-[0.5rem] ml-5 text-2sm rounded-sm text-text-dimmed bg-transparent group-hover/button:bg-charcoal-750 focus-custom",
icon: undefined,
iconSpacing: undefined,
shortcutVariant: undefined,
Expand All @@ -141,7 +159,7 @@ const variant = {
};

const allVariants = {
$all: "font-normal text-center font-sans justify-center items-center shrink-0 transition duration-150 rounded-[3px] select-none group-focus:outline-none group-disabled:opacity-75 group-disabled:pointer-events-none focus-custom",
$all: "font-normal text-center font-sans justify-center items-center shrink-0 transition duration-150 rounded-[3px] select-none group-focus/button:outline-none group-disabled/button:opacity-75 group-disabled/button:pointer-events-none focus-custom",
variant: variant,
};

Expand Down Expand Up @@ -192,13 +210,18 @@ export function ButtonContent(props: ButtonContentPropsType) {
(typeof LeadingIcon === "string" ? (
<NamedIcon
name={LeadingIcon}
className={cn(iconClassName, leadingIconClassName, "shrink-0 justify-start")}
className={cn(
iconClassName,
leadingIconClassName,
"shrink-0 justify-start",
variation.icon
)}
/>
) : (
<LeadingIcon
className={cn(
iconClassName,
textColorClassName,
variation.icon,
leadingIconClassName,
"shrink-0 justify-start"
)}
Expand All @@ -218,13 +241,18 @@ export function ButtonContent(props: ButtonContentPropsType) {
(typeof TrailingIcon === "string" ? (
<NamedIcon
name={TrailingIcon}
className={cn(iconClassName, trailingIconClassName, "shrink-0 justify-end")}
className={cn(
iconClassName,
trailingIconClassName,
"shrink-0 justify-end",
variation.icon
)}
/>
) : (
<TrailingIcon
className={cn(
iconClassName,
textColorClassName,
variation.icon,
trailingIconClassName,
"shrink-0 justify-end"
)}
Expand Down Expand Up @@ -267,7 +295,7 @@ export const Button = forwardRef<HTMLButtonElement, ButtonPropsType>(

return (
<button
className={cn("group outline-none focus-custom", props.fullWidth ? "w-full" : "")}
className={cn("group/button outline-none focus-custom", props.fullWidth ? "w-full" : "")}
type={type}
disabled={disabled}
onClick={onClick}
Expand Down Expand Up @@ -313,7 +341,7 @@ export const LinkButton = ({
return (
<div
className={cn(
"group pointer-events-none cursor-default opacity-40 outline-none",
"group/button pointer-events-none cursor-default opacity-40 outline-none",
props.fullWidth ? "w-full" : ""
)}
>
Expand All @@ -327,7 +355,7 @@ export const LinkButton = ({
<ExtLink
href={to.toString()}
ref={innerRef}
className={cn("group focus-custom", props.fullWidth ? "w-full" : "")}
className={cn("group/button focus-custom", props.fullWidth ? "w-full" : "")}
onClick={onClick}
onMouseDown={onMouseDown}
onMouseEnter={onMouseEnter}
Expand All @@ -342,7 +370,7 @@ export const LinkButton = ({
<Link
to={to}
ref={innerRef}
className={cn("group focus-custom", props.fullWidth ? "w-full" : "")}
className={cn("group/button focus-custom", props.fullWidth ? "w-full" : "")}
onClick={onClick}
onMouseDown={onMouseDown}
onMouseEnter={onMouseEnter}
Expand All @@ -363,7 +391,7 @@ export const NavLinkButton = ({ to, className, target, ...props }: NavLinkPropsT
return (
<NavLink
to={to}
className={cn("group outline-none", props.fullWidth ? "w-full" : "")}
className={cn("group/button outline-none", props.fullWidth ? "w-full" : "")}
target={target}
>
{({ isActive, isPending }) => (
Expand Down
Loading