Skip to content

Commit

Permalink
feat: add yinyang background image
Browse files Browse the repository at this point in the history
  • Loading branch information
zerosoul committed Oct 24, 2019
1 parent bec67ca commit 8a96949
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 12 deletions.
Binary file added src/assets/img/chinese.circle.border.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/assets/img/yinyang.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion src/components/ColorSet/IconCollection.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import React, { useState } from 'react';
import styled from 'styled-components';
import ChineseBorder from '../../assets/img/chinese.circle.border.png';

const Wrapper = styled.li`
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
background: #ef7a82;
background-color: #ef7a82;
background-image: url(${ChineseBorder});
background-size: cover;
position: relative;
.icon {
width: 1.4rem;
Expand Down
15 changes: 6 additions & 9 deletions src/components/ColorSet/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import React, { useState } from 'react';

import styled from 'styled-components';
import IconCollection from './IconCollection';
import Yinyang from '../../assets/img/yinyang.svg';

const Wrapper = styled.div`
ul {
display: flex;
Expand Down Expand Up @@ -37,15 +39,12 @@ const Wrapper = styled.div`
right: -1.6rem;
top: 50%;
transform: translateY(-50%);
background-image: url(${Yinyang});
background-size: cover;
width: 3rem;
height: 3rem;
background: #333;
border: none;
border: 1px solid #000;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
font-size: 1.2rem;
transition: all 0.6s;
box-shadow: 1px -1px 6px black;
}
Expand Down Expand Up @@ -92,9 +91,7 @@ const ColorSet = ({ currSetName = '', setCurrSet, sets = [] }) => {
return null;
})}
</ul>
<button onClick={handleSetHover} className="btn">
</button>
<button onClick={handleSetHover} className="btn"></button>
</Wrapper>
);
};
Expand Down
7 changes: 5 additions & 2 deletions src/components/Preview/Toggle.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import styled from 'styled-components';

import Yinyang from '../../assets/img/yinyang.svg';
const Wrapper = styled.div`
position: absolute;
right: 0.8rem;
Expand All @@ -27,7 +27,9 @@ const Wrapper = styled.div`
display: block;
width: 16px;
margin: 0;
background: #ffffff;
background-color: #fff;
background-image: url(${Yinyang});
background-size: cover;
position: absolute;
top: 0;
bottom: 0;
Expand All @@ -45,6 +47,7 @@ const Wrapper = styled.div`
}
.onoffswitch-checkbox:checked + .onoffswitch-label:before {
right: 0;
transform: rotate(180deg);
}
`;
export default function Toggle({ checkVal = true, togglePoetry }) {
Expand Down

0 comments on commit 8a96949

Please sign in to comment.