-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feature: add information tiles to new homepage * i18n * adjust border radius * adjust gap, padding and margin of the tile container
- Loading branch information
Showing
14 changed files
with
378 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"saleor-dashboard": patch | ||
--- | ||
|
||
You can now see information tiles regarding Saleor Docs, community, and technical help in the home page. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,36 @@ | ||
import { DashboardCard } from "@dashboard/components/Card"; | ||
import * as React from "react"; | ||
|
||
export type InfoTile = { | ||
id: string; | ||
header: React.ReactNode; | ||
content: React.ReactNode; | ||
bottomActions: React.ReactNode; | ||
}; | ||
|
||
export const HomeInfoTile: React.FC<InfoTile> = ({ id, bottomActions, content, header }) => ( | ||
<DashboardCard | ||
backgroundColor="default1" | ||
borderStyle="solid" | ||
borderColor="default1" | ||
borderRadius={3} | ||
borderWidth={1} | ||
display="flex" | ||
flexDirection="column" | ||
gap={4} | ||
key={id} | ||
margin={0} | ||
> | ||
<DashboardCard.Header> | ||
<DashboardCard.Title display="flex" alignItems="center" gap={3}> | ||
{header} | ||
</DashboardCard.Title> | ||
</DashboardCard.Header> | ||
|
||
<DashboardCard.Content>{content}</DashboardCard.Content> | ||
|
||
<DashboardCard.BottomActions paddingTop={2} marginTop="auto"> | ||
{bottomActions} | ||
</DashboardCard.BottomActions> | ||
</DashboardCard> | ||
); |
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,29 @@ | ||
import { Box } from "@saleor/macaw-ui-next"; | ||
import React from "react"; | ||
import { useIntl } from "react-intl"; | ||
|
||
import { HomeInfoTile } from "./HomeInfoTile"; | ||
import { getTilesData } from "./tileData"; | ||
|
||
export const HomeTilesContainer: React.FC = () => { | ||
const intl = useIntl(); | ||
|
||
const tiles = getTilesData({ intl }); | ||
|
||
return ( | ||
<Box | ||
display="grid" | ||
gridTemplateColumns={{ | ||
mobile: 1, | ||
desktop: 2, | ||
}} | ||
gap={6} | ||
marginTop={6} | ||
marginRight={6} | ||
> | ||
{tiles.map(tile => ( | ||
<HomeInfoTile key={tile.id} {...tile} /> | ||
))} | ||
</Box> | ||
); | ||
}; |
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,7 @@ | ||
export const SALEOR_GITHUB_URL = "https://github.com/saleor/saleor"; | ||
export const SALEOR_DISCORD_URL = "https://discord.com/invite/H52JTZAtSH"; | ||
export const TECHNICAL_HELP_CTA_URL = | ||
"https://www.getclockwise.com/c/rian-dillon-saleor-io/short-call-with-saleor"; | ||
export const APPS_DOCS_URL = "https://docs.saleor.io/developer/extending/apps/overview"; | ||
export const CHECKOUT_DOCS_URL = "https://docs.saleor.io/developer/checkout/overview#introduction"; | ||
export const DASHBOARD_DOCS_URL = "https://github.com/saleor/saleor-dashboard/releases"; |
Oops, something went wrong.