-
Notifications
You must be signed in to change notification settings - Fork 808
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Boost: Move button and snackbar style to module scss (#41371)
Co-authored-by: Peter Petrov <[email protected]>
- Loading branch information
Showing
15 changed files
with
180 additions
and
171 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
58 changes: 0 additions & 58 deletions
58
projects/plugins/boost/app/assets/src/css/components/button.scss
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
projects/plugins/boost/app/assets/src/css/components/snackbar.scss
This file was deleted.
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
55 changes: 55 additions & 0 deletions
55
.../plugins/boost/app/assets/src/js/features/speed-score/pop-out/stories/pop-out.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,55 @@ | ||
import type { Meta } from '@storybook/react'; | ||
import React from 'react'; | ||
import { VanillaPopOut } from '../pop-out'; | ||
|
||
const meta: Meta< typeof VanillaPopOut > = { | ||
title: 'Plugins/Boost/Features/Speed Score/Vanilla PopOut', | ||
component: VanillaPopOut, | ||
argTypes: { | ||
message: { control: 'object' }, | ||
onClose: { action: 'onClose' }, | ||
onDismiss: { action: 'onDismiss' }, | ||
isVisible: { control: 'boolean' }, | ||
}, | ||
decorators: [ | ||
Story => ( | ||
<div style={ { maxWidth: '800px', minHeight: '600px', fontSize: '16px' } }> | ||
<Story /> | ||
</div> | ||
), | ||
], | ||
}; | ||
|
||
const defaultValues = { | ||
isVisible: true, | ||
message: { | ||
id: 'score_decrease', | ||
title: 'Speed score has fallen', | ||
body: ( | ||
<> | ||
<p> | ||
Most of the time Jetpack Boost will increase your site speed, but there may be cases where your score does not increase. | ||
</p> | ||
<p> | ||
Try refreshing your score, and if it doesn’t help, check our guide on improving your site speed score: | ||
</p> | ||
</> | ||
), | ||
cta: 'Read the guide', | ||
ctaLink: 'https://example.com', | ||
}, | ||
onClose: () => { | ||
defaultValues.isVisible = false; | ||
}, | ||
onDismiss: () => { | ||
defaultValues.isVisible = false; | ||
}, | ||
}; | ||
|
||
export default meta; | ||
const Template = args => { | ||
return <VanillaPopOut { ...args } />; | ||
}; | ||
export const _default = Template.bind( {} ); | ||
_default.args = defaultValues; | ||
|
Oops, something went wrong.