-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add empty state for services and choose payment
- Loading branch information
Showing
5 changed files
with
117 additions
and
25 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
examples/client/Locomotion/src/Components/EmptyState/index.tsx
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,26 @@ | ||
import React from 'react'; | ||
import { | ||
Container, Description, Title, TitleWithoutDescription, | ||
} from './styled'; | ||
|
||
interface EmptyStateProps { | ||
title: string; | ||
description?: string; | ||
} | ||
const EmptyState = ({ | ||
title, | ||
description, | ||
}: EmptyStateProps) => ( | ||
<Container> | ||
{description | ||
? <Title>{title}</Title> | ||
: <TitleWithoutDescription>{title}</TitleWithoutDescription> | ||
} | ||
|
||
{description ? <Description>{description}</Description> : null} | ||
</Container> | ||
); | ||
EmptyState.defaultProps = { | ||
description: '', | ||
}; | ||
export default EmptyState; |
42 changes: 42 additions & 0 deletions
42
examples/client/Locomotion/src/Components/EmptyState/styled.ts
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,42 @@ | ||
import { Text, View } from 'react-native'; | ||
import styled from 'styled-components'; | ||
|
||
export const Container = styled(View)` | ||
border-radius: 8px; | ||
border: 1px dashed rgba(125, 139, 172, 0.32); | ||
display: flex; | ||
padding: 16px; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
margin: 4px; | ||
flex: 1 0 0; | ||
align-self: stretch; | ||
`; | ||
export const Title = styled(Text)` | ||
align-self: stretch; | ||
color: #212229; | ||
text-align: center; | ||
font-family: Inter; | ||
font-size: 14px; | ||
font-style: normal; | ||
font-weight: 600; | ||
`; | ||
export const Description = styled(Text)` | ||
align-self: stretch; | ||
color: #666975; | ||
text-align: center; | ||
font-family: Inter; | ||
font-size: 14px; | ||
font-style: normal; | ||
font-weight: 400; | ||
`; | ||
export const TitleWithoutDescription = styled(Text)` | ||
align-self: stretch; | ||
color: #666975; | ||
text-align: center; | ||
font-family: Inter; | ||
font-size: 14px; | ||
font-style: normal; | ||
font-weight: 500; | ||
`; |
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