Skip to content

Commit

Permalink
docs: Add options description
Browse files Browse the repository at this point in the history
  • Loading branch information
hwookim committed Jan 3, 2024
1 parent 6c90b67 commit df8d202
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions packages/addon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,43 @@ export const WithOutCookie = Template.bind({});
```

Each Story has independent cookie.

### Encoding cookie

If you want to encode the cookies on the panel, you can use the `cookieEncoding` option.

```jsx
export const WithEncodedCookie: Story = {
parameters: {
cookie: {
test: 'TEST!',
},
cookieEncoding: true,
},
};
```

This option defaults to `false`.

You can use this option after `v3.1.0`

### Preserve existing cookies

If you want to preserve existing cookies, you can use the `cookiePreserve` option.

Preserve existing cookies, but only manipulate the ones you specify via parameters.

```jsx
export const PreserveCookies: Story = {
parameters: {
cookie: {
test: 'TEST!',
},
cookiePreserve: true,
},
};
```

This option defaults to `false`.

You can use this option after `v3.2.0`

0 comments on commit df8d202

Please sign in to comment.