Skip to content

Commit

Permalink
update indentation in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
alexasselin008 committed Nov 29, 2024
1 parent c9a136e commit a298bb8
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions apps/docs/content/components/icons/Icon.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Both `Icon` and `createIcon` enable you to style the icon using the styled syste

The `createIcon` function is a convenience wrapper around the process of generating icons with `Icon`, allowing you to achieve the same functionality with less effort.

```jsx
```tsx
import CustomIcon16 from "./path/to/custom-icon-16.svg";
import CustomIcon24 from "./path/to/custom-icon-24.svg";
import CustomIcon32 from "./path/to/custom-icon-32.svg";
Expand All @@ -39,7 +39,7 @@ const CustomIcon = createIcon(CustomIcon16, CustomIcon24, CustomIcon32, "CustomI

### Using the Icon component

```jsx
```tsx
import CustomIcon16 from "./path/to/custom-icon-16.svg"
import CustomIcon24 from "./path/to/custom-icon-24.svg"
import CustomIcon32 from "./path/to/custom-icon-32.svg"
Expand Down
28 changes: 14 additions & 14 deletions apps/docs/content/getting-started/guides/components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ Append custom CSS classes to modify styles.
<Expand title="Example: Creating an AI Card">
```tsx
export function AICard({ children, className, ...rest }: CardProps) {
const classNames = clsx(className, "ai-gradiant-border");
return (
<Card className={classNames} {...rest}>
{children}
</Card>
);
const classNames = clsx(className, "ai-gradiant-border");
return (
<Card className={classNames} {...rest}>
{children}
</Card>
);
}
```
</Expand>
Expand Down Expand Up @@ -113,14 +113,14 @@ You can control the component&apos;s behavior by passing a controlled property.
<Expand title="Example: Creating a popover that opens on hover.">
```tsx
function MyCustomButtonPopoverTrigger({ children, ...rest }: PopoverTriggerProps) {
const ref = useRef();
const isHovered = useHover(ref);
return (
<PopoverTrigger {...rest} open={isHovered}>
<Button ref={ref}>Hoverable Button</Button>
{children}
</PopoverTrigger>
);
const ref = useRef();
const isHovered = useHover(ref);
return (
<PopoverTrigger {...rest} open={isHovered}>
<Button ref={ref}>Hoverable Button</Button>
{children}
</PopoverTrigger>
);
}
```
</Expand>
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/getting-started/guides/text-crop.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ If you need to implement this technique, you can use the following CSS. Keep in

```css title="component.css"
.off-centered-text {
font-family: 'ABC Favorit Mono', sans-serif;
font-family: 'ABC Favorit Mono', sans-serif;
}

.off-centenred-text::before,
Expand Down
18 changes: 9 additions & 9 deletions apps/docs/content/getting-started/installation-path/react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import { createRoot } from 'react-dom/client';

const root = createRoot(document.getElementById('root'));
root.render(
<HopperProvider withBodyStyle>
<App />
</HopperProvider>
<HopperProvider withBodyStyle>
<App />
</HopperProvider>
);
```

Expand All @@ -48,12 +48,12 @@ Leverage Hopper's components and styled system to build user interfaces efficien
import { Button, Stack } from "@hopper-ui/components";

const Demo = () => {
return (
<Stack>
<Button>Click me</Button>
<Button>Click me</Button>
</Stack>
)
return (
<Stack>
<Button>Click me</Button>
<Button>Click me</Button>
</Stack>
);
}
```

Expand Down

0 comments on commit a298bb8

Please sign in to comment.