diff --git a/.changeset/restyle-history.md b/.changeset/restyle-history.md new file mode 100644 index 00000000000..13c41127c8d --- /dev/null +++ b/.changeset/restyle-history.md @@ -0,0 +1,5 @@ +--- +'@graphiql/plugin-history': patch +--- + +Restyle to the v6 design. New row layout with status dot, mono name label, and inline variables snippet. Uses `PanelHeader` for the panel chrome. diff --git a/packages/graphiql-plugin-history/src/components.tsx b/packages/graphiql-plugin-history/src/components.tsx index 1710eaf6ee7..ba734dbe8d0 100644 --- a/packages/graphiql-plugin-history/src/components.tsx +++ b/packages/graphiql-plugin-history/src/components.tsx @@ -12,6 +12,7 @@ import { Button, Tooltip, UnStyledButton, + PanelHeader, } from '@graphiql/react'; import { useHistory, useHistoryActions } from './context'; @@ -64,24 +65,28 @@ export const History: FC = () => { const hasFavorites = Boolean(favorites.length); const hasItems = Boolean(items.length); + const clearButton = + clearStatus || hasItems ? ( + + ) : undefined; + return (
-
- History - {(clearStatus || hasItems) && ( - - )} -
+ {hasFavorites && (