Skip to content

Commit

Permalink
Merge pull request #9 from stackai/feat/expands-chat-size-for-disclaimer
Browse files Browse the repository at this point in the history
[Chore]: Expands default chat height size for fitting disclaimer message
  • Loading branch information
sanchezfdezjavier committed Mar 6, 2024
2 parents 6efc79a + 68d3154 commit 225eebc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
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

0 comments on commit 225eebc

Please sign in to comment.