Skip to content

Commit

Permalink
test: update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Butterworth committed Aug 20, 2019
1 parent 035e26a commit 143fcb1
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 45 deletions.
42 changes: 22 additions & 20 deletions .storybook/__snapshots__/Storyshots.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ Array [

exports[`Storyshots Collapsible usage 1`] = `
<div
className="pgn_collapsible collapsible-card collapsible-card"
className="pgn_collapsible collapsible-card"
>
<div
aria-expanded={false}
Expand All @@ -394,26 +394,28 @@ exports[`Storyshots Collapsible usage 1`] = `
role="button"
tabIndex={0}
>
<p>
<strong />
</p>
<svg
aria-hidden="true"
className="svg-inline--fa fa-plus fa-w-14 "
data-icon="plus"
data-prefix="fas"
focusable="false"
role="img"
style={Object {}}
viewBox="0 0 448 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"
fill="currentColor"
<span />
<span
className="ml-2"
>
<svg
aria-hidden="true"
className="svg-inline--fa fa-plus fa-w-14 "
data-icon="plus"
data-prefix="fas"
focusable="false"
role="img"
style={Object {}}
/>
</svg>
viewBox="0 0 448 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"
fill="currentColor"
style={Object {}}
/>
</svg>
</span>
</div>
<div
className="pgn-transition-replace-group position-relative"
Expand Down
24 changes: 3 additions & 21 deletions src/Collapsible/Collapsible.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,18 @@ import React from 'react';
import { storiesOf } from '@storybook/react';

import Collapsible from './index';
import Icon from '../Icon';

storiesOf('Collapsible', module)
.add('usage', () => (
<Collapsible
className="collapsible-card"
onToggle={isOpen => console.log('Collapsible toggled and open is: ', isOpen)}
onOpen={() => console.log('Collapsible opened.')}
onClose={() => console.log('Collapsible closed.')}
>
<Collapsible.Trigger className="collapsible-card-header d-flex align-items-center">
<h4 className="flex-grow-1">A heading</h4>
<p>Your stuff goes here.</p>

<span className="collapsible-card-header-icon" aria-hidden>
<Collapsible.Visible whenClosed>
<Icon className="fa fa-chevron-down" />
</Collapsible.Visible>

<Collapsible.Visible whenOpen>
<Icon className="fa fa-chevron-up" />
</Collapsible.Visible>
</span>
<Collapsible.Trigger closeOnly tag="a" className="btn btn-outline-primary">
Close
</Collapsible.Trigger>

<Collapsible.Body className="collapsible-card-body">
<p>Your stuff goes here.</p>

<Collapsible.Trigger closeOnly tag="a" className="btn btn-outline-primary">
Close
</Collapsible.Trigger>
</Collapsible.Body>
</Collapsible>
));
8 changes: 4 additions & 4 deletions src/Collapsible/__snapshots__/Collapsible.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`<Collapsible /> Controlled Rendering renders closed by default 1`] = `
<div
className="pgn_collapsible collapsible"
className="pgn_collapsible"
open={false}
>
<div
Expand Down Expand Up @@ -53,7 +53,7 @@ exports[`<Collapsible /> Controlled Rendering renders closed by default 1`] = `

exports[`<Collapsible /> Controlled Rendering renders open by default 1`] = `
<div
className="pgn_collapsible collapsible"
className="pgn_collapsible"
>
<div
aria-expanded={false}
Expand Down Expand Up @@ -103,7 +103,7 @@ exports[`<Collapsible /> Controlled Rendering renders open by default 1`] = `

exports[`<Collapsible /> Uncontrolled Rendering renders closed by default 1`] = `
<div
className="pgn_collapsible collapsible"
className="pgn_collapsible"
>
<div
aria-expanded={false}
Expand Down Expand Up @@ -153,7 +153,7 @@ exports[`<Collapsible /> Uncontrolled Rendering renders closed by default 1`] =

exports[`<Collapsible /> Uncontrolled Rendering renders open by default 1`] = `
<div
className="pgn_collapsible collapsible is-open"
className="pgn_collapsible is-open"
>
<div
aria-expanded={true}
Expand Down

0 comments on commit 143fcb1

Please sign in to comment.