Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
akshay5995 committed Jun 5, 2020
1 parent 3197efe commit 6c87db1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 20 deletions.
18 changes: 9 additions & 9 deletions src/docs/MultiplePageDemo/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ const { Content } = Layout;
const { TabPane } = Tabs;
const { Text } = Typography;

const initalReportProps = {
const initialReportProps = {
tokenType: 'Embed',
};

const ReportDemo = () => {
const [reportProps, setReportProps] = React.useState(
initalReportProps
initialReportProps
);
const [isVaildConfig, setIsValidConfig] = React.useState(false);
const [isValidConfig, setIsValidConfig] = React.useState(false);
const [activeTab, setActiveTab] = React.useState('form');

const onTabClick = (key, event) => setActiveTab(key);
Expand Down Expand Up @@ -76,7 +76,7 @@ const ReportDemo = () => {

const onReset = React.useCallback(() => {
setIsValidConfig(false);
}, [isVaildConfig]);
}, [isValidConfig]);

const extraSettings = {
filterPaneEnabled: false,
Expand Down Expand Up @@ -118,7 +118,7 @@ const ReportDemo = () => {
key="form"
>
<Form
initalReportProps={initalReportProps}
initialReportProps={initialReportProps}
onSubmit={renderWithReportProps}
onReset={onReset}
/>
Expand Down Expand Up @@ -151,9 +151,9 @@ const ReportDemo = () => {
</Info>
</TabPane>
<TabPane
disabled={!isVaildConfig}
disabled={!isValidConfig}
tab={
<Badge dot={isVaildConfig}>
<Badge dot={isValidConfig}>
<span>
<CheckCircleTwoTone twoToneColor="#52c41a" />
Report
Expand Down Expand Up @@ -212,7 +212,7 @@ const ReportDemo = () => {
</div>
</div>
<div style={{ display: 'flex', height: '100%' }}>
{isVaildConfig && (
{isValidConfig && (
<Report
style={{
height: '100%',
Expand All @@ -234,7 +234,7 @@ const ReportDemo = () => {
}}
/>
)}
{isVaildConfig && (
{isValidConfig && (
<Report
style={{
height: '100%',
Expand Down
20 changes: 9 additions & 11 deletions src/docs/Report/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import Form from './Form';
const { Content } = Layout;
const { TabPane } = Tabs;

const initalReportProps = {
const initialReportProps = {
tokenType: 'Embed',
};

const ReportDemo = () => {
const [reportProps, setReportProps] = React.useState(
initalReportProps
initialReportProps
);
const [isVaildConfig, setIsValidConfig] = React.useState(false);
const [isValidConfig, setIsValidConfig] = React.useState(false);
const [activeTab, setActiveTab] = React.useState('form');

const onTabClick = (key, event) => setActiveTab(key);
Expand All @@ -30,7 +30,7 @@ const ReportDemo = () => {

const onReset = React.useCallback(() => {
setIsValidConfig(false);
}, [isVaildConfig]);
}, [isValidConfig]);

const extraSettings = {
filterPaneEnabled: false,
Expand All @@ -50,15 +50,15 @@ const ReportDemo = () => {
key="form"
>
<Form
initalReportProps={initalReportProps}
initialReportProps={initialReportProps}
onSubmit={renderWithReportProps}
onReset={onReset}
/>
</TabPane>
<TabPane
disabled={!isVaildConfig}
disabled={!isValidConfig}
tab={
<Badge dot={isVaildConfig}>
<Badge dot={isValidConfig}>
<span>
<CheckCircleTwoTone twoToneColor="#52c41a" />
Report
Expand All @@ -67,17 +67,15 @@ const ReportDemo = () => {
}
key="report"
>
{isVaildConfig && (
{isValidConfig && (
<Report
style={{
height: '100%',
border: '0',
}}
{...reportProps}
extraSettings={extraSettings}
onLoad={(report) => {
console.log('Report Loaded!');
}}
onLoad={onLoadAndSetTokenListener}
onRender={(report) => {
console.log('Report Rendered');
}}
Expand Down

0 comments on commit 6c87db1

Please sign in to comment.