Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Chore]: Expands default chat height size for fitting disclaimer message #9

Merged
merged 3 commits into from
Mar 6, 2024
Merged
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
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ You should be able to see the chatbot embedded in your app

These are all the props you can pass to the `<Stack />` component.

| Name | Type | Description
| ---- | ------ | -----------
| `project` | `string` | The URL of the project you want to embed
| `width` | `string` | Specifies the width of the iframe. The value must be a string with a numeric value followed by a unit (e.g., '35rem', '100px'). The default is '35rem'. If the width is less than the minimum width of 15 rem, a warning is logged, and the width is adjusted to the minimum. If the width is specified without a recognizable unit or is an invalid string, an error is thrown.
| `fixed` | `boolean` | Set to true if you want the chatbot to be fixed to the bottom of the screen, or false if you want it to be relative to the page.
| Name | Type | Description |
| --------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `project` | `string` | The URL of the project you want to embed |
| `width` | `string` | Specifies the width of the iframe. The value must be a string with a numeric value followed by a unit (e.g., '35rem', '100px'). The default is '35rem'. If the width is less than the minimum width of 15 rem, a warning is logged, and the width is adjusted to the minimum. If the width is specified without a recognizable unit or is an invalid string, an error is thrown. |
| `fixed` | `boolean` | Set to true if you want the chatbot to be fixed to the bottom of the screen, or false if you want it to be relative to the page. |

`height` of the iframe is automatically set to 38.5 rem.
`height` of the iframe is automatically set to `40 rem`.

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-stackai",
"version": "0.1.7",
"version": "0.1.9",
"files": [
"dist"
],
Expand Down
2 changes: 1 addition & 1 deletion src/Stack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const Stack = forwardRef(function Stack({
width = '35rem',
fixed = true,
}: StackProps) {
const height = '38.5rem';
const height = '40rem';

const adjustWidth = (w: string) => {
const minWidth = '15rem';
Expand Down
Loading