From 06f567f4462efded5488f066da7c89ea4bdf36b7 Mon Sep 17 00:00:00 2001 From: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com> Date: Tue, 7 Mar 2023 13:14:14 +0100 Subject: [PATCH] fix(admin-ui): table action gap (#3386) * add gap in table actions * add changeset * Update .changeset/light-frogs-smoke.md Co-authored-by: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com> --------- Co-authored-by: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com> Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com> --- .changeset/light-frogs-smoke.md | 5 ++++ .../src/components/molecules/table/index.tsx | 30 +++++++++---------- .../sales-channels-modal/available-screen.tsx | 11 +++---- 3 files changed, 25 insertions(+), 21 deletions(-) create mode 100644 .changeset/light-frogs-smoke.md diff --git a/.changeset/light-frogs-smoke.md b/.changeset/light-frogs-smoke.md new file mode 100644 index 0000000000..0072f8917e --- /dev/null +++ b/.changeset/light-frogs-smoke.md @@ -0,0 +1,5 @@ +--- +"@medusajs/admin-ui": patch +--- + + fix(admin-ui): Add gap in table actions diff --git a/packages/admin-ui/ui/src/components/molecules/table/index.tsx b/packages/admin-ui/ui/src/components/molecules/table/index.tsx index a1fd0363b7..e6e681a4de 100644 --- a/packages/admin-ui/ui/src/components/molecules/table/index.tsx +++ b/packages/admin-ui/ui/src/components/molecules/table/index.tsx @@ -1,13 +1,11 @@ -import clsx from "clsx" -import React from "react" -import { useNavigate } from "react-router-dom" -import Spinner from "../../atoms/spinner" -import ArrowLeftIcon from "../../fundamentals/icons/arrow-left-icon" -import ArrowRightIcon from "../../fundamentals/icons/arrow-right-icon" -import SortingIcon from "../../fundamentals/icons/sorting-icon" import Actionables, { ActionType } from "../../molecules/actionables" import FilteringOptions, { FilteringOptionProps } from "./filtering-option" + +import React from "react" +import SortingIcon from "../../fundamentals/icons/sorting-icon" import TableSearch from "./table-search" +import clsx from "clsx" +import { useNavigate } from "react-router-dom" type TableRowProps = React.HTMLAttributes & { forceDropdown?: boolean @@ -73,9 +71,9 @@ const Table = React.forwardRef( return (
-
+
{filteringOptions ? ( -
+
{Array.isArray(filteringOptions) ? filteringOptions.map((fo) => ) : filteringOptions} @@ -83,7 +81,7 @@ const Table = React.forwardRef( ) : ( )} -
+
{tableActions &&
{tableActions}
} {enableSearch && ( >(({ className, children, ...props }, ref) => ( - + {children} )) @@ -159,9 +157,9 @@ Table.SortingHeadCell = React.forwardRef< ref ) => { return ( - +
{ e.preventDefault() if (!sortDirection) { @@ -225,9 +223,9 @@ Table.Row = React.forwardRef( { const { source, onSave } = useSalesChannelsModal() @@ -75,7 +76,7 @@ const AvailableScreen = () => { /> } setSelectedRowIds={setSelectedRowIds} - limit={15} + limit={LIMIT} offset={offset} setOffset={setOffset} setQuery={setQuery}