-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #482 from searchspring/develop
v0.27.0 Release
- Loading branch information
Showing
48 changed files
with
4,211 additions
and
891 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
126 changes: 126 additions & 0 deletions
126
...snap-preact-components/src/components/Organisms/BranchOverride/BranchOverride.stories.tsx
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,126 @@ | ||
import { h, Fragment } from 'preact'; | ||
|
||
import { ArgsTable, PRIMARY_STORY } from '@storybook/addon-docs/blocks'; | ||
|
||
import { BranchOverride } from './BranchOverride'; | ||
import { componentArgs } from '../../../utilities'; | ||
import Readme from '../BranchOverride/readme.md'; | ||
|
||
export default { | ||
title: `Organisms/BranchOverride`, | ||
component: BranchOverride, | ||
parameters: { | ||
docs: { | ||
page: () => ( | ||
<div> | ||
<Readme /> | ||
<ArgsTable story={PRIMARY_STORY} /> | ||
</div> | ||
), | ||
}, | ||
}, | ||
decorators: [ | ||
(Story) => ( | ||
<div | ||
style={{ | ||
maxWidth: '900px', | ||
position: 'relative', | ||
}} | ||
> | ||
<Story /> | ||
</div> | ||
), | ||
], | ||
argTypes: { | ||
name: { | ||
description: 'bundle branch name', | ||
type: { required: true }, | ||
table: { | ||
type: { | ||
summary: 'string', | ||
}, | ||
}, | ||
control: { type: 'text' }, | ||
}, | ||
details: { | ||
description: 'Object containing details for branch override', | ||
type: { required: false }, | ||
table: { | ||
type: { | ||
summary: '{ url: string; lastModified: string }', | ||
}, | ||
}, | ||
control: { type: 'object' }, | ||
}, | ||
error: { | ||
description: 'Object containing error message and description', | ||
type: { required: false }, | ||
table: { | ||
type: { | ||
summary: '{ message: string; description: string }', | ||
}, | ||
}, | ||
control: { type: 'object' }, | ||
}, | ||
onRemoveClick: { | ||
description: 'optional function to run on remove button click', | ||
table: { | ||
type: { | ||
summary: '(e: Event, name: string) => void', | ||
}, | ||
}, | ||
action: 'onRemoveClick', | ||
}, | ||
darkMode: { | ||
description: 'force dark darkMode', | ||
type: { required: false }, | ||
table: { | ||
type: { | ||
summary: 'boolean', | ||
}, | ||
}, | ||
control: { type: 'boolean' }, | ||
}, | ||
...componentArgs, | ||
}, | ||
}; | ||
|
||
const Template = (args) => <BranchOverride {...args} />; | ||
|
||
export const Auto = Template.bind({}); | ||
Auto.args = { | ||
name: 'next', | ||
details: { | ||
url: 'https://snapui.searchspring.io/y56s6x/next/bundle.js', | ||
lastModified: '1 Feb 2022 1:02:03 GMT', | ||
}, | ||
}; | ||
|
||
export const Dark = Template.bind({}); | ||
Dark.args = { | ||
name: 'next', | ||
details: { | ||
url: 'https://snapui.searchspring.io/y56s6x/next/bundle.js', | ||
lastModified: '1 Feb 2022 1:02:03 GMT', | ||
}, | ||
darkMode: true, | ||
}; | ||
|
||
export const Error = Template.bind({}); | ||
Error.args = { | ||
name: 'testing', | ||
error: { | ||
message: 'Branch not found!', | ||
description: 'Incorrect branch name or branch no longer exists.', | ||
}, | ||
}; | ||
|
||
export const Light = Template.bind({}); | ||
Light.args = { | ||
name: 'next', | ||
details: { | ||
url: 'https://snapui.searchspring.io/y56s6x/next/bundle.js', | ||
lastModified: '1 Feb 2022 1:02:03 GMT', | ||
}, | ||
darkMode: false, | ||
}; |
Oops, something went wrong.