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

Feature/add options to exports #70

Merged
merged 3 commits into from
Feb 21, 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
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# promo-dashboard, by [Tincre`.dev`](https://tincre.dev/)
# promo-dashboard, by [Tincre`.dev`](https://tincre.com/)

A dashboard for Tincre [Promo](https://tincre.dev/promo). Use it in conjunction with the [`promo-button`](https://github.com/Tincre/promo-button).
A dashboard for Tincre [Promo](https://tincre.com/). Use it in conjunction with the [`promo-button`](https://github.com/Tincre/promo-button).

- [promo-dashboard, by Tincre`.dev`](#promo-dashboard-by-tincredev)
- [promo-dashboard, by Tincre](#promo-dashboard-by-tincre)
- [Installation](#installation)
- [Yarn](#yarn)
- [Npm](#npm)
Expand All @@ -11,8 +11,8 @@ A dashboard for Tincre [Promo](https://tincre.dev/promo). Use it in conjunction
- [Usage](#usage)
- [Frontend](#frontend)
- [`campaignsData`](#campaignsdata)
- [`isLoading`](#isLoading)
- [`campaignDetailData`](#campaigndetaildata)
- [`isLoading`](#isloading)
- [`handleRepeatButtonClick`](#handlerepeatbuttonclick)
- [`handleCampaignTypeButtonClick`](#handlecampaigntypebuttonclick)
- [`handleSubmitSaveButtonClick`](#handlesubmitsavebuttonclick)
Expand Down Expand Up @@ -243,13 +243,15 @@ For example,

##### `dashboardOptions`

Users can customize some behavior within the dashboard, such as the support email domain and the local email part.
Users can customize some behavior within the dashboard, such as the support email domain and the local email part. The default options object can be imported directly for ease of use.

> ℹ️ There are two customizable portions in `team@tincre.dev`, the **local part**, i.e. `team` and the **email domain**, i.e. `tincre.dev`.
> ℹ️ There are two customizable portions in `team@tincre.com`, the **local part**, i.e. `team` and the **email domain**, i.e. `tincre.com`.

For example,

```jsx
import { options } from '@tincre/promo-dashboard'

<PromoDashboard
dashboardOptions={{
emailDomain: 'tincre.com',
Expand All @@ -259,7 +261,7 @@ For example,
promoChatAgentName?: string;
promoChatInputMessagePlaceholder?: string;
promoChatExecuteRecaptcha?: (action: string) => Promise<string>;
campaignTypes?: CampaignType[];
campaignTypes?: options?.campaignTypes;
}}
/>
```
Expand Down
1 change: 1 addition & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ export {
successToast,
infoToast,
failureToast,
options,
};
export type {
CampaignData,
Expand Down
Loading