generated from vtex-apps/service-example
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from vtex/chore/admin-template
Chore/admin template
- Loading branch information
Showing
14 changed files
with
649 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"section": "other", | ||
"titleId": "admin/navigation.label", | ||
"subSectionItems": [ | ||
{ | ||
"labelId": "admin/navigation.commissions.label", | ||
"path": "admin/affiliates-commissions" | ||
}, | ||
{ | ||
"labelId": "admin/navigation.dashboard.label", | ||
"path": "admin/affiliates-dashboard" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"admin.app.affiliates": {}, | ||
"admin.app.affiliates.commissions": { | ||
"component": "CommissionsPage", | ||
"path": "/admin/app/affiliates-commissions" | ||
}, | ||
"admin.app.affiliates.dashboard": { | ||
"component": "DashboardPage", | ||
"path": "/admin/app/affiliates-dashboard" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"admin/navigation.label": "Affiliates", | ||
"admin/navigation.commissions.label": "Commissions", | ||
"admin/navigation.dashboard.label": "Dashboard" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"admin/navigation.label": "Afiliados", | ||
"admin/navigation.commissions.label": "Comissões", | ||
"admin/navigation.dashboard.label": "Dashboard" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import type { FC } from 'react' | ||
import React from 'react' | ||
import { | ||
Page, | ||
PageHeader, | ||
PageTitle, | ||
PageContent, | ||
createSystem, | ||
} from '@vtex/admin-ui' | ||
|
||
import CommissionsTabs from './components/admin/commissions/CommissionsTabs' | ||
|
||
const [ThemeProvider] = createSystem({ | ||
key: 'affiliates-commissions', | ||
}) | ||
|
||
const CommissionsPage: FC = () => { | ||
return ( | ||
<ThemeProvider> | ||
<Page> | ||
<PageHeader> | ||
<PageTitle>Page Title</PageTitle> | ||
</PageHeader> | ||
<PageContent csx={{ padding: 5 }}> | ||
<CommissionsTabs /> | ||
</PageContent> | ||
</Page> | ||
</ThemeProvider> | ||
) | ||
} | ||
|
||
export default CommissionsPage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import type { FC } from 'react' | ||
import React from 'react' | ||
import { | ||
Page, | ||
PageHeader, | ||
PageTitle, | ||
PageContent, | ||
createSystem, | ||
} from '@vtex/admin-ui' | ||
|
||
const [ThemeProvider] = createSystem({ | ||
key: 'affiliates-dashboard', | ||
}) | ||
|
||
const DashboardPage: FC = () => { | ||
return ( | ||
<ThemeProvider> | ||
<Page> | ||
<PageHeader> | ||
<PageTitle>Dashboard</PageTitle> | ||
</PageHeader> | ||
<PageContent csx={{ padding: 5 }}>Dashboard</PageContent> | ||
</Page> | ||
</ThemeProvider> | ||
) | ||
} | ||
|
||
export default DashboardPage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import type { FC } from 'react' | ||
import React from 'react' | ||
import { Tabs, Tab, TabList, TabPanel, useTabState } from '@vtex/admin-ui' | ||
|
||
import ImportCommissionsTab from './ImportCommissionsTab' | ||
import ExportCommissionsTab from './ExportCommissionsTab' | ||
|
||
const CommissionsTabs: FC = () => { | ||
const state = useTabState() | ||
|
||
return ( | ||
<Tabs state={state}> | ||
<TabList aria-label="Usage Tabs"> | ||
<Tab id="1">Tab 1</Tab> | ||
<Tab id="2">Tab 2</Tab> | ||
</TabList> | ||
<TabPanel id="1" csx={{ padding: 3 }}> | ||
<ImportCommissionsTab /> | ||
</TabPanel> | ||
<TabPanel id="2" csx={{ padding: 3 }}> | ||
<ExportCommissionsTab /> | ||
</TabPanel> | ||
</Tabs> | ||
) | ||
} | ||
|
||
export default CommissionsTabs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import type { FC } from 'react' | ||
import React from 'react' | ||
|
||
const ExportCommissionsTab: FC = () => { | ||
return <div>Tab 2</div> | ||
} | ||
|
||
export default ExportCommissionsTab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import type { FC } from 'react' | ||
import React from 'react' | ||
|
||
const ImportCommissionsTab: FC = () => { | ||
return <div>Tab 1</div> | ||
} | ||
|
||
export default ImportCommissionsTab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.