-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
61a832f
commit 7aa75f1
Showing
39 changed files
with
529 additions
and
496 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,2 @@ | ||
node_modules | ||
dist |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,36 +1,19 @@ | ||
import { createContext, ElementType, useContext } from "react"; | ||
import { Flex } from "../Box"; | ||
import styled from "styled-components"; | ||
import { rgba } from "polished"; | ||
import { ArrowLeftIcon } from "../Svg"; | ||
import Text from "../Text"; | ||
export const MenuContext = createContext<{ linkComponent: ElementType }>({ linkComponent: "a" }); | ||
|
||
interface IProps { | ||
label: string; | ||
to: string; | ||
} | ||
import { BreadcrumbsWrapper } from "./styles"; | ||
import { IBreadcrumbsProps } from './types'; | ||
|
||
const BreadcrumbsWrap = styled(Flex)` | ||
display: inline-flex; | ||
justify-content: center; | ||
align-items: center; | ||
padding: 2px 16px; | ||
border-radius: 12px; | ||
min-width: 89px; | ||
text-decoration: none; | ||
border: 0.5px solid ${({ theme }) => rgba(theme.colors.strokeGray, 0.2)}; | ||
background: ${({ theme }) => rgba(theme.colors.strokeGray, 0.08)}; | ||
`; | ||
export const MenuContext = createContext<{ linkComponent: ElementType }>({ linkComponent: "a" }); | ||
|
||
export default function Breadcrumbs({ label, to }: IProps) { | ||
export default function ({ label, to }: IBreadcrumbsProps) { | ||
const { linkComponent } = useContext(MenuContext); | ||
return ( | ||
<BreadcrumbsWrap as={linkComponent} href={to}> | ||
<BreadcrumbsWrapper as={linkComponent} href={to}> | ||
<ArrowLeftIcon size={"16px"} mr={1} color="darkGray" /> | ||
<Text variant="body-2" color="darkGray"> | ||
{label} | ||
</Text> | ||
</BreadcrumbsWrap> | ||
</BreadcrumbsWrapper> | ||
); | ||
} |
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,15 @@ | ||
import styled from "styled-components"; | ||
import { Flex } from "../Box"; | ||
import { rgba } from "polished"; | ||
|
||
export const BreadcrumbsWrapper = styled(Flex)` | ||
display: inline-flex; | ||
justify-content: center; | ||
align-items: center; | ||
padding: 2px 16px; | ||
border-radius: 12px; | ||
min-width: 89px; | ||
text-decoration: none; | ||
border: 0.5px solid ${({ theme }) => rgba(theme.colors.strokeGray, 0.2)}; | ||
background: ${({ theme }) => rgba(theme.colors.strokeGray, 0.08)}; | ||
`; |
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,4 @@ | ||
export interface IBreadcrumbsProps { | ||
label: string; | ||
to: string; | ||
} |
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.