Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 26 additions & 0 deletions docs/fern/docs/pages/sdk/calculate-total-price.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: calculateTotalPrice
---

# calculateTotalPrice

Calculates the total price of items in a cart.

## Parameters

- `items`: An array of `CartItem` objects. Each `CartItem` should have `price` and `quantity` properties.

## Example

```tsx
import { calculateTotalPrice } from '@stackframe/stack';

const cartItems = [
{ price: 10, quantity: 2 },
{ price: 15, quantity: 1 },
{ price: 5, quantity: 3 }
];

const total = calculateTotalPrice(cartItems);
console.log(total); // Output: 45
```
22 changes: 22 additions & 0 deletions docs/fern/docs/pages/sdk/social-media-icons.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: SocialMediaIcons
---

# SocialMediaIcons

A component that renders social media icons with links.

## Example

```tsx
import { SocialMediaIcons } from '@stackframe/stack';

const MyComponent = () => {
return (
<div>
<h1>Connect with me</h1>
<SocialMediaIcons />
</div>
);
};
```
32 changes: 32 additions & 0 deletions docs/fern/docs/pages/sdk/use-stack-frame-api.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: useStackFrameApi
---

# useStackFrameApi

A custom hook that provides access to the StackFrame API client.

## Parameters

- `options` (optional): An object with the following properties:
- `apiKey` (optional): A string representing the API key for authentication.

## Example

```tsx
import { useStackFrameApi } from '@stackframe/stack';

function MyComponent() {
const api = useStackFrameApi({
apiKey: 'your-api-key-here',
});

// Use the api object to make API calls
// For example:
// api.someEndpoint.someMethod()

return (
// Your component JSX
);
}
```