From 6094f1982511d6e186dc1bfc8b0811a6f120ed17 Mon Sep 17 00:00:00 2001 From: Chris Cedrone Date: Fri, 24 Jan 2025 14:23:38 -0500 Subject: [PATCH 1/3] Initial commit, broken link and styling fixes throughout doc site --- .changeset/fix-docs-links-and-styling.md | 5 +++++ .../src/pages/api-intro/styles-and-themes.mdx | 2 ++ website/react-magma-docs/src/pages/api-intro/usage.mdx | 2 +- website/react-magma-docs/src/pages/api/button.mdx | 4 ++-- website/react-magma-docs/src/pages/api/dropdown.mdx | 2 +- website/react-magma-docs/src/pages/api/formgroup.mdx | 2 +- website/react-magma-docs/src/pages/api/global-styles.mdx | 2 +- website/react-magma-docs/src/pages/api/tooltip.mdx | 6 ++++-- website/react-magma-docs/src/pages/api/transition.mdx | 4 ++-- .../react-magma-docs/src/pages/design-intro/get-started.mdx | 2 +- website/react-magma-docs/src/pages/design/icon.mdx | 4 +--- 11 files changed, 21 insertions(+), 14 deletions(-) create mode 100644 .changeset/fix-docs-links-and-styling.md diff --git a/.changeset/fix-docs-links-and-styling.md b/.changeset/fix-docs-links-and-styling.md new file mode 100644 index 000000000..fa47ef7a4 --- /dev/null +++ b/.changeset/fix-docs-links-and-styling.md @@ -0,0 +1,5 @@ +--- +'react-magma-docs': patch +--- + +fix: Repointed a few broken links and fixed some styling bugs throughout the examples. diff --git a/website/react-magma-docs/src/pages/api-intro/styles-and-themes.mdx b/website/react-magma-docs/src/pages/api-intro/styles-and-themes.mdx index a8c78d5c1..74dec16a1 100644 --- a/website/react-magma-docs/src/pages/api-intro/styles-and-themes.mdx +++ b/website/react-magma-docs/src/pages/api-intro/styles-and-themes.mdx @@ -1025,6 +1025,7 @@ export function Example() { aria-label="Right" icon={} isInverse + style={{ marginLeft: magma.spaceScale.spacing03 }} variant={ButtonVariant.link} /> @@ -1047,6 +1048,7 @@ export function Example() { aria-label="Right" icon={} isInverse + style={{ marginLeft: magma.spaceScale.spacing03 }} variant={ButtonVariant.link} /> diff --git a/website/react-magma-docs/src/pages/api-intro/usage.mdx b/website/react-magma-docs/src/pages/api-intro/usage.mdx index 1f334a884..987bb96d3 100644 --- a/website/react-magma-docs/src/pages/api-intro/usage.mdx +++ b/website/react-magma-docs/src/pages/api-intro/usage.mdx @@ -46,7 +46,7 @@ to insure consistency across products. To use the `GlobalStyles` object, simply import it from `react-magma-dom` and include it in your App. -The `GlobalStyles` component can be nested inside the ThemeContext.Provider to inherit styles from the theme. +The `GlobalStyles` component can be nested inside the ThemeContext.Provider to inherit styles from the theme. ```jsx noRender startExpanded import React from 'react'; diff --git a/website/react-magma-docs/src/pages/api/button.mdx b/website/react-magma-docs/src/pages/api/button.mdx index 97c028134..bdb19b639 100644 --- a/website/react-magma-docs/src/pages/api/button.mdx +++ b/website/react-magma-docs/src/pages/api/button.mdx @@ -15,7 +15,7 @@ props: ## Basic Usage -When using multiple buttons, they should be wrapped in a ButtonGroup. +When using multiple buttons, they should be wrapped in a ButtonGroup. When used with icons, the Button component takes a slightly different set of props. For information on how to use this component with icons, please see documentation on Icon Buttons. @@ -205,7 +205,7 @@ export function Example() { Solid marketing inverse - + diff --git a/website/react-magma-docs/src/pages/api/dropdown.mdx b/website/react-magma-docs/src/pages/api/dropdown.mdx index b4c0534e2..630d8c682 100644 --- a/website/react-magma-docs/src/pages/api/dropdown.mdx +++ b/website/react-magma-docs/src/pages/api/dropdown.mdx @@ -31,7 +31,7 @@ The `DropdownButton` is a button that handles the opening and closing of the men The `DropdownContent` component contains the content that appears when the button is clicked. That content may contain individual menu items, represented in `DropdownMenuItem` components, or it may contain other markup. -When using multiple dropdowns, they should be wrapped in a ButtonGroup. +When using multiple dropdowns, they should be wrapped in a ButtonGroup. ```tsx import React from 'react'; diff --git a/website/react-magma-docs/src/pages/api/formgroup.mdx b/website/react-magma-docs/src/pages/api/formgroup.mdx index 57bc3aaf8..8adb17fec 100644 --- a/website/react-magma-docs/src/pages/api/formgroup.mdx +++ b/website/react-magma-docs/src/pages/api/formgroup.mdx @@ -12,7 +12,7 @@ props: Checkbox and{' '} Toggle components. For{' '} Radio Buttons, you should use the{' '} - Radio Group component. + Radio Group component. ## Basic Usage diff --git a/website/react-magma-docs/src/pages/api/global-styles.mdx b/website/react-magma-docs/src/pages/api/global-styles.mdx index 4288dc047..998794ae5 100644 --- a/website/react-magma-docs/src/pages/api/global-styles.mdx +++ b/website/react-magma-docs/src/pages/api/global-styles.mdx @@ -13,7 +13,7 @@ title: Global Styles ## Usage -The `GlobalStyles` component can be nested inside the ThemeContext.Provider to inherit styles from the theme. +The `GlobalStyles` component can be nested inside the ThemeContext.Provider to inherit styles from the theme. ```tsx import React from 'react'; diff --git a/website/react-magma-docs/src/pages/api/tooltip.mdx b/website/react-magma-docs/src/pages/api/tooltip.mdx index 10a771af0..cd46680c8 100644 --- a/website/react-magma-docs/src/pages/api/tooltip.mdx +++ b/website/react-magma-docs/src/pages/api/tooltip.mdx @@ -60,6 +60,8 @@ The `Tooltip` component takes a `position` property, that accepts the following ```tsx import React from 'react'; import { + Flex, + FlexBehavior, Tooltip, EnumTooltipPosition, IconButton, @@ -74,7 +76,7 @@ import { export function Example() { return ( - <> + - + ); } ``` diff --git a/website/react-magma-docs/src/pages/api/transition.mdx b/website/react-magma-docs/src/pages/api/transition.mdx index decf1bad4..15395d1b8 100644 --- a/website/react-magma-docs/src/pages/api/transition.mdx +++ b/website/react-magma-docs/src/pages/api/transition.mdx @@ -86,7 +86,7 @@ The Nudge transitions (`nudgeLeft`, `nudgeRight`, `nudgeTop`, `nudgeBottom`) mov ```tsx import React from 'react'; import styled from '@emotion/styled'; -import { Button, Transition } from 'react-magma-dom'; +import { Button, Card, CardBody, Transition } from 'react-magma-dom'; export function Example() { const [isOpen, setIsOpen] = React.useState(false); @@ -99,7 +99,7 @@ export function Example() { return ( <> - +