This repository has been archived by the owner on Jan 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
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
e946fe4
commit 096c168
Showing
4 changed files
with
85 additions
and
58 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
21 changes: 21 additions & 0 deletions
21
src/components/TokenPairSelector/TokenPairSelector.stories.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,21 @@ | ||
import React from 'react' | ||
|
||
// also exported from '@storybook/react' if you can deal with breaking changes in 6.1 | ||
import { Meta } from '@storybook/react/types-6-0' | ||
|
||
import GlobalStyles from 'components/layout/GenericLayout/GlobalStyles' | ||
import { RouterDecorator } from 'storybook/RouterDecorator' | ||
import { TokenPairSelector } from 'components/TokenPairSelector' | ||
|
||
export default { | ||
title: 'component/TokenPairSelector', | ||
component: TokenPairSelector, | ||
decorators: [RouterDecorator], | ||
} as Meta | ||
|
||
export const Normal: React.FC = () => ( | ||
<div> | ||
<GlobalStyles /> | ||
<TokenPairSelector selectedPair="ETH/USDC" selectLabel="Select Pair" /> | ||
</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
54 changes: 54 additions & 0 deletions
54
src/components/TokenPairSelector/tokenPairSelector.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,54 @@ | ||
import styled from 'styled-components' | ||
import ArrowWhite from 'assets/img/arrow-white.svg' | ||
|
||
export const TokenPairSelectorStyled = styled.div` | ||
display: flex; | ||
width: 100%; | ||
> button { | ||
width: 100%; | ||
height: var(--height-bar-default); | ||
background: var(--color-primary); | ||
color: var(--color-text-secondary1); | ||
appearance: none; | ||
border: 0; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding: 0 1.6rem; | ||
box-sizing: border-box; | ||
border-bottom: 0.1rem solid var(--color-border); | ||
outline: 0; | ||
cursor: pointer; | ||
transition: color 0.3s ease-in-out; | ||
&:hover { | ||
color: var(--color-text-primary); | ||
} | ||
} | ||
> button > b { | ||
font-size: 1.5rem; | ||
letter-spacing: 0.03rem; | ||
} | ||
> button > i { | ||
font-size: 1.2rem; | ||
font-style: normal; | ||
display: flex; | ||
flex-flow: row nowrap; | ||
justify-content: center; | ||
align-items: center; | ||
font-weight: var(--font-weight-medium); | ||
&::after { | ||
display: block; | ||
height: 1.2rem; | ||
width: 1.2rem; | ||
content: ''; | ||
background: url(${ArrowWhite}) no-repeat center/contain; | ||
transform: rotate(90deg); | ||
margin: 0 0 0 0.7rem; | ||
} | ||
} | ||
` |