-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Possible to delete sandboxes * Int * Fix lint errors * Styling tweaks
- Loading branch information
Showing
38 changed files
with
319 additions
and
113 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
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,30 @@ | ||
import React from 'react'; | ||
import testRender from 'app/utils/test/render'; | ||
import { MemoryRouter } from 'react-router-dom'; | ||
import Button from './Button'; | ||
|
||
describe('Button', () => { | ||
it('renders', () => { | ||
testRender(<Button>Test</Button>); | ||
}); | ||
|
||
it('renders onClick', () => { | ||
testRender(<Button onClick={() => {}}>Test</Button>); | ||
}); | ||
|
||
it('renders hrefs', () => { | ||
testRender( | ||
<MemoryRouter> | ||
<Button to="https://ivesvh.com">Test</Button> | ||
</MemoryRouter>, | ||
); | ||
}); | ||
|
||
it('renders properties', () => { | ||
testRender(<Button small>Test</Button>); | ||
}); | ||
|
||
it('renders disabled', () => { | ||
testRender(<Button disabled>Test</Button>); | ||
}); | ||
}); |
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,12 @@ | ||
import styled from 'styled-components'; | ||
import theme from 'common/theme'; | ||
|
||
export default styled.button` | ||
display: inline-block; | ||
background-color: transparent; | ||
color: ${() => theme.secondary()}; | ||
border: none; | ||
outline: none; | ||
cursor: pointer; | ||
text-decoration: underline; | ||
`; |
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,13 @@ | ||
import React from 'react'; | ||
import testRender from 'app/utils/test/render'; | ||
import LinkButton from './LinkButton'; | ||
|
||
describe('LinkButton', () => { | ||
it('renders', () => { | ||
testRender(<LinkButton>Test</LinkButton>); | ||
}); | ||
|
||
it('renders onClick', () => { | ||
testRender(<LinkButton onClick={() => {}}>Test</LinkButton>); | ||
}); | ||
}); |
45 changes: 45 additions & 0 deletions
45
src/app/components/buttons/__snapshots__/Button.test.js.snap
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,45 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Button renders 1`] = ` | ||
<button | ||
className="gSpDoI" | ||
> | ||
Test | ||
</button> | ||
`; | ||
|
||
exports[`Button renders disabled 1`] = ` | ||
<button | ||
className="dEOCIp" | ||
disabled={true} | ||
> | ||
Test | ||
</button> | ||
`; | ||
|
||
exports[`Button renders hrefs 1`] = ` | ||
<a | ||
className="gSpDoI" | ||
href="https://ivesvh.com" | ||
onClick={[Function]} | ||
> | ||
Test | ||
</a> | ||
`; | ||
|
||
exports[`Button renders onClick 1`] = ` | ||
<button | ||
className="gSpDoI" | ||
onClick={[Function]} | ||
> | ||
Test | ||
</button> | ||
`; | ||
|
||
exports[`Button renders properties 1`] = ` | ||
<button | ||
className="eDPTas" | ||
> | ||
Test | ||
</button> | ||
`; |
18 changes: 18 additions & 0 deletions
18
src/app/components/buttons/__snapshots__/LinkButton.test.js.snap
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 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`LinkButton renders 1`] = ` | ||
<button | ||
className="lnvNEu" | ||
> | ||
Test | ||
</button> | ||
`; | ||
|
||
exports[`LinkButton renders onClick 1`] = ` | ||
<button | ||
className="lnvNEu" | ||
onClick={[Function]} | ||
> | ||
Test | ||
</button> | ||
`; |
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
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
Oops, something went wrong.