-
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 #16 from platformbuilders/feat/refactor
Feat/refactor
- Loading branch information
Showing
7 changed files
with
112 additions
and
5 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
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,18 @@ | ||
import React from 'react'; | ||
import { DividerText, Line, OptionsWrapper } from './styles'; | ||
|
||
type Props = { | ||
marginTop?: number; | ||
marginBottom?: number; | ||
text: string; | ||
}; | ||
|
||
const LabelDivider: React.FC<Props> = ({ text, marginTop, marginBottom }) => ( | ||
<OptionsWrapper marginTop={marginTop} marginBottom={marginBottom}> | ||
<Line /> | ||
<DividerText>{text}</DividerText> | ||
<Line /> | ||
</OptionsWrapper> | ||
); | ||
|
||
export default LabelDivider; |
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,31 @@ | ||
import styled from 'styled-components/native'; | ||
import { getTheme } from '../../utils/helpers'; | ||
import Typography from '../Typography'; | ||
|
||
const smallerSpacing = getTheme('smallerSpacing'); | ||
const disabled = getTheme('texts.dark'); | ||
|
||
type Props = { | ||
marginTop?: number; | ||
marginBottom?: number; | ||
}; | ||
|
||
export const OptionsWrapper = styled.View` | ||
margin-top: ${({ marginTop }: Props) => marginTop || 0}px; | ||
margin-bottom: ${({ marginBottom }: Props) => marginBottom || 0}px; | ||
flex-direction: row; | ||
justify-content: center; | ||
align-items: center; | ||
`; | ||
|
||
export const Line = styled.View` | ||
width: 33%; | ||
height: 1px; | ||
background-color: ${disabled}90; | ||
`; | ||
|
||
export const DividerText = styled(Typography)` | ||
padding: ${smallerSpacing}; | ||
color: ${disabled}90; | ||
font-weight: bold; | ||
`; |
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