-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: relocate ErrorCode component from web
- Loading branch information
1 parent
4be092a
commit a4cff2a
Showing
3 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
62 changes: 62 additions & 0 deletions
62
src/components/molecules/ErrorCode/ErrorCode.styles.module.scss
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,62 @@ | ||
@import '@digitable-team/web-ui-components/src/scss/variables'; | ||
|
||
.error { | ||
width: 100%; | ||
height: auto; | ||
margin-top: 200px; | ||
} | ||
|
||
.error, | ||
.box { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
flex-wrap: wrap; | ||
} | ||
|
||
.box { | ||
width: 1070px; | ||
margin-top: 92px; | ||
} | ||
|
||
.numeric { | ||
font-size: 400px; | ||
font-weight: 500; | ||
line-height: 484px; | ||
letter-spacing: 0; | ||
color: $color-base; | ||
} | ||
|
||
.text { | ||
width: 100%; | ||
height: 170px; | ||
font-size: 70px; | ||
font-weight: 700; | ||
text-align: center; | ||
margin: 0; | ||
} | ||
|
||
.highlight-text { | ||
color: $color-base; | ||
} | ||
|
||
.button { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
height: 59px; | ||
width: 365px; | ||
border-radius: 36px; | ||
margin: 50px; | ||
border: 1px solid $color-base; | ||
background: transparent; | ||
color: $color-base; | ||
outline: none; | ||
font-size: 30px; | ||
text-decoration: none; | ||
|
||
&:hover { | ||
color: $color-background-black; | ||
background-color: $color-base; | ||
} | ||
} |
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,33 @@ | ||
import React from 'react' | ||
|
||
import cx from 'classnames' | ||
import { Link } from 'react-router-dom' | ||
|
||
import { Image } from 'src/components/atoms/Image' | ||
|
||
import css from './ErrorCode.styles.module.scss' | ||
|
||
export type ErrorCodeProps = { | ||
imageUrl?: string | ||
leftNumber?: number | ||
rightNumber?: number | ||
simpleText?: string | ||
highlightText?: string | ||
} | ||
|
||
export const ErrorCode = ({ imageUrl, leftNumber, rightNumber, simpleText, highlightText }: ErrorCodeProps) => { | ||
return ( | ||
<div className={css.error}> | ||
<span className={css.numeric}>{leftNumber}</span> | ||
<Image src={imageUrl} width="568" height="568" /> | ||
<span className={css.numeric}>{rightNumber}</span> | ||
<div className={css.box}> | ||
<span className={css.text}>{simpleText}</span> | ||
<span className={cx(css.text, css.highlightText)}> {highlightText}</span> | ||
<Link to="/" className={css.button}> | ||
На главную | ||
</Link> | ||
</div> | ||
</div> | ||
) | ||
} |
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 @@ | ||
export * from './ErrorCode' |