Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
Fix destructuring assignments (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliewongbandue authored Jan 30, 2023
1 parent cfd9296 commit d93c015
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/_labs/ThemeKit/ThemeKit.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const box = {
};

function ThemeKit(props) {
const globalTheme = useContext(ThemeContext);
const { globalTheme } = useContext(ThemeContext);
const subTheme = globalTheme.name;

const [theme, setTheme] = useState(themes.vimeo);
Expand Down
6 changes: 6 additions & 0 deletions src/components/inputs/Input/Input.props.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,3 +211,9 @@ export function Autosuggest() {
);
}
Autosuggest.storyName = 'autosuggest';

export function Number() {
<Layout.StoryVertical>
<Input type="number" variant="underline" />
</Layout.StoryVertical>;
}
2 changes: 1 addition & 1 deletion src/storybook/welcome/Flower.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const Pre = styled.pre`
`;

function Code({ children, ...props }) {
const theme = useContext(ThemeContext);
const { theme } = useContext(ThemeContext);

const saturation = 1;
const lightness = theme.name === 'dark' ? 0.667 : 0.4;
Expand Down
4 changes: 2 additions & 2 deletions src/themes/themes.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const padding = '2rem';
export const Common = () => <HookedStory />;

function HookedStory() {
const theme = useContext(ThemeContext);
const { theme } = useContext(ThemeContext);

return (
<div>
Expand Down Expand Up @@ -109,7 +109,7 @@ function HookedStory() {
}

function ThemeBlock({ block }) {
const theme = useContext(ThemeContext);
const { theme } = useContext(ThemeContext);
const section = Object.entries(theme[block]);

return (
Expand Down

0 comments on commit d93c015

Please # to comment.