Skip to content

Commit

Permalink
React Spectrum v3 Button and Link are failing the gatsby build
Browse files Browse the repository at this point in the history
  • Loading branch information
icaraps committed Jul 6, 2020
1 parent 014d74b commit 923ed2d
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 17 deletions.
4 changes: 2 additions & 2 deletions packages/gatsby-theme-spectrum/src/components/Feedback.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const Feedback = ({onYes, onNo}) => (
<Flex alignItems="center">
<span css={css`padding-right: var(--spectrum-global-dimension-static-size-200);`}>Was this helpful ?</span>
<ButtonGroup>
<Button variant="primary" onPress={() => {onYes && onYes()}}>Yes</Button>
<Button variant="primary" onPress={() => {onNo && onNo()}}>No</Button>
{/*<Button variant="primary" onPress={() => {onYes && onYes()}}>Yes</Button>*/}
{/*<Button variant="primary" onPress={() => {onNo && onNo()}}>No</Button>*/}
</ButtonGroup>
</Flex>
);
Expand Down
4 changes: 2 additions & 2 deletions packages/gatsby-theme-spectrum/src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ export default ({path}) => {
</div>
</View>
<View gridArea="console" justifySelf="center">
<Button elementType="a" href="https://console.adobe.io" target="_blank" variant="primary">Console</Button>
{/*<Button elementType="a" href="https://console.adobe.io" target="_blank" variant="primary">Console</Button>*/}
</View>
<View gridArea="profile" justifySelf="center">
<Button isQuiet variant="primary">Sign in</Button>
{/*<Button isQuiet variant="primary">Sign in</Button>*/}
</View>
</Grid>
</nav>
Expand Down
7 changes: 4 additions & 3 deletions packages/gatsby-theme-spectrum/src/components/Heading2.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ export default ({children, ...props}) => (
}
`}>
{children}
<Link marginStart="size-100">
<a href={`#${props.id}`}>#</a>
</Link>
<a href={`#${props.id}`}>#</a>
{/*<Link marginStart="size-100">*/}
{/* <a href={`#${props.id}`}>#</a>*/}
{/*</Link>*/}
</h2>
<Divider marginBottom="size-300"/>
</>
Expand Down
7 changes: 4 additions & 3 deletions packages/gatsby-theme-spectrum/src/components/Heading3.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ export default ({children, ...props}) => (
}
`}>
{children}
<Link marginStart="size-50">
<a href={`#${props.id}`}>#</a>
</Link>
<a href={`#${props.id}`}>#</a>
{/*<Link marginStart="size-50">*/}
{/* <a href={`#${props.id}`}>#</a>*/}
{/*</Link>*/}
</h3>
</>
);
14 changes: 10 additions & 4 deletions packages/gatsby-theme-spectrum/src/components/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,18 @@ export default ({children, pageContext, path}) => (
css={css`
margin-top: var(--spectrum-global-dimension-static-size-200);
`}>
<Link href={link}
target="_blank"
rel="nofollow noopener noreferrer">
<a href={link}
target="_blank"
rel="nofollow noopener noreferrer">
<span css={css`margin-right: var(--spectrum-global-dimension-static-size-100)`}>{text}</span>
<LinkOut size="XS"/>
</Link>
</a>
{/*<Link href={link}*/}
{/* target="_blank"*/}
{/* rel="nofollow noopener noreferrer">*/}
{/* <span css={css`margin-right: var(--spectrum-global-dimension-static-size-100)`}>{text}</span>*/}
{/* <LinkOut size="XS"/>*/}
{/*</Link>*/}
</li>
))}
</ul>
Expand Down
7 changes: 4 additions & 3 deletions packages/gatsby-theme-spectrum/src/components/Link.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import React from 'react';
import {Link} from '@react-spectrum/link';

export default ({children, ...props}) => (
<Link>
<a {...props}>{children}</a>
</Link>
<a {...props}>{children}</a>
// <Link>
// <a {...props}>{children}</a>
// </Link>
)

0 comments on commit 923ed2d

Please sign in to comment.