Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): migrate react-chrome to storybook #883

Merged
merged 2 commits into from
Sep 21, 2020

Conversation

austingreendev
Copy link
Contributor

@austingreendev austingreendev commented Sep 17, 2020

Description

This PR migrates our react-chrome documentation to storybook. It is a 1-to-1 migration so no changes in docs/examples should be noticeable.

Checklist

  • [ ]πŸ‘Œ design updates are Garden Designer approved (add the
    designer as a reviewer)
  • 🌐 Styleguidist demo is up-to-date (yarn start)
  • ⬅️ renders as expected with reversed (RTL) direction
  • 🀘 renders as expected with Bedrock CSS (?bedrock)
  • β™Ώ analyzed via axe and evaluated using VoiceOver
  • πŸ’‚β€β™‚οΈ includes new unit tests
  • πŸ“ tested in Chrome, Firefox, Safari, Edge, and IE11

const backgroundColor = getColor(hue, 600, theme);
const LIGHT_COLOR = 'white';
const Chrome = React.forwardRef<HTMLDivElement, IChromeProps>(({ hue, isFluid, ...props }, ref) => {
const theme = useContext(ThemeContext);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The withTheme usage confuses the Storybook story-source plugin. This aligns the Theme usage with newer components.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Austin94 does this mean we'll be subsequently dropping withTheme throughout?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be a good idea. Cleans up our prop-sheets throughout and also aligns us with eventual changes in styled-components v6+

@@ -6,13 +6,14 @@
*/

import React, { HTMLAttributes } from 'react';
import { StyledHeaderItemWrapper } from '../../styled';
import { StyledHeaderItemWrapper, IStyledBaseHeaderItemProps } from '../../styled';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving to TS for the examples found we were missing some types for this component.

@zendesk-garden zendesk-garden temporarily deployed to staging September 17, 2020 17:41 Inactive
Copy link
Member

@jzempel jzempel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The index.html link is broken.

@austingreendev
Copy link
Contributor Author

@jzempel I've updated the root link for Chrome

@zendesk-garden zendesk-garden temporarily deployed to staging September 18, 2020 17:24 Inactive
@austingreendev austingreendev merged commit 7b776f8 into main Sep 21, 2020
@austingreendev austingreendev deleted the agreen/storybook-chrome branch September 21, 2020 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants