Skip to content

Commit

Permalink
Fix accentColor issues allowing to pass gradient values
Browse files Browse the repository at this point in the history
Fix flexbox issue in Helper Navigation

closes #172
closes #173
  • Loading branch information
elrumordelaluz committed Sep 20, 2019
1 parent fb69cfe commit b8a67ac
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/components/Badge.js
Expand Up @@ -3,8 +3,8 @@ import styled from 'styled-components'
const Badge = styled.span`
position: absolute;
font-family: monospace;
background-color: ${props => props.accentColor};
background-color: var(--reactour-accent);
background: var(--reactour-accent);
background: ${props => props.accentColor};
height: 1.875em;
line-height: 2;
padding-left: 0.8125em;
Expand Down
18 changes: 10 additions & 8 deletions src/components/Dot.js
Expand Up @@ -4,7 +4,9 @@ const Dot = styled.button`
counter-increment: dot;
width: 8px;
height: 8px;
border: 1px solid;
border: ${props =>
props.current === props.index ? '0' : '1px solid #caccce'};
border-radius: 100%;
padding: 0;
display: block;
Expand All @@ -13,15 +15,15 @@ const Dot = styled.button`
cursor: ${props => (props.disabled ? 'not-allowed' : 'pointer')};
transform: scale(${props => (props.current === props.index ? 1.25 : 1)});
color: ${props =>
props.current === props.index ? props.accentColor : '#caccce'};
background-color: ${props =>
props.current === props.index ? props.accentColor : 'transparent'};
color: ${props =>
props.current === props.index ? 'var(--reactour-accent)' : '#caccce'};
background-color: ${props =>
props.current === props.index ? 'var(--reactour-accent)' : 'transparent'};
background: ${props =>
props.current === props.index ? 'var(--reactour-accent)' : 'none'};
color: ${props =>
props.current === props.index ? props.accentColor : '#caccce'};
background: ${props =>
props.current === props.index ? props.accentColor : 'none'};
&:before {
content: counter(dot);
Expand Down
1 change: 1 addition & 0 deletions src/components/Navigation.js
Expand Up @@ -5,6 +5,7 @@ const Navigation = styled.nav`
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
`

export default Navigation
42 changes: 41 additions & 1 deletion src/demo/App.js
Expand Up @@ -39,7 +39,7 @@ function App() {

const disableBody = target => disableBodyScroll(target)
const enableBody = target => enableBodyScroll(target)
const accentColor = '#5cb7b7'
const accentColor = 'linear-gradient(to right, #1c8f9e, #5cb7b7)'
return (
<>
<GlobalStyle />
Expand Down Expand Up @@ -139,6 +139,46 @@ const tourConfig = [
content: `Keep in mind that you could try and test everything during the Tour.
For example, try selecting the highlighted text…`,
},
{
selector: '[data-tut="reactour__copy"]',
content: `Keep in mind that you could try and test everything during the Tour.
For example, try selecting the highlighted text…`,
},
{
selector: '[data-tut="reactour__copy"]',
content: `Keep in mind that you could try and test everything during the Tour.
For example, try selecting the highlighted text…`,
},
{
selector: '[data-tut="reactour__copy"]',
content: `Keep in mind that you could try and test everything during the Tour.
For example, try selecting the highlighted text…`,
},
{
selector: '[data-tut="reactour__copy"]',
content: `Keep in mind that you could try and test everything during the Tour.
For example, try selecting the highlighted text…`,
},
{
selector: '[data-tut="reactour__copy"]',
content: `Keep in mind that you could try and test everything during the Tour.
For example, try selecting the highlighted text…`,
},
{
selector: '[data-tut="reactour__copy"]',
content: `Keep in mind that you could try and test everything during the Tour.
For example, try selecting the highlighted text…`,
},
{
selector: '[data-tut="reactour__copy"]',
content: `Keep in mind that you could try and test everything during the Tour.
For example, try selecting the highlighted text…`,
},
{
selector: '[data-tut="reactour__copy"]',
content: `Keep in mind that you could try and test everything during the Tour.
For example, try selecting the highlighted text…`,
},
{
selector: '[data-tut="reactour__style"]',
content: function DemoHelperComponent() {
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
@@ -1,4 +1,4 @@
import 'focus-outline-manager'
import Tour from './TourHooks'
import Tour from './Tour'
export default Tour
export { Arrow, Close, Badge, Controls, Navigation, Dot } from './components'

0 comments on commit b8a67ac

Please sign in to comment.