-
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.
Merge pull request #205 from tsukuba-cojt/feature/203-involve-border-…
…radius コンテンツが存在しないときのUIを改善
- Loading branch information
Showing
5 changed files
with
69 additions
and
19 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,37 @@ | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
|
||
const Wrapper = styled.div<{offset: number}>` | ||
height: ${(props) => `calc(100vh - ${props.offset}px)`}; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
color: #666666; | ||
padding: 16px; | ||
`; | ||
|
||
const DescriptionWrapper = styled.div` | ||
text-align: center; | ||
padding: 32px 0 16px; | ||
color: #666666; | ||
word-break: auto-phrase; | ||
`; | ||
|
||
type Props = { | ||
icon: React.ReactNode; | ||
text: string; | ||
children?: React.ReactNode; | ||
offset?: number; | ||
} | ||
export default function NoItem({icon, text, children, offset = 190}: Props) { | ||
return ( | ||
<Wrapper offset={offset}> | ||
{icon} | ||
<DescriptionWrapper> | ||
<p>{text}</p> | ||
</DescriptionWrapper> | ||
{children} | ||
</Wrapper> | ||
) | ||
} |
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