feat: release notes (#283)
* feat: add release.ts * feat: add utils * chore: add scripts to tsconfig.json include * feat: add changelog logic, component, storybook file, scripts, and update to Node v20.9.0 (LTS) * chore: update packages * feat: use conventionalcommits for changelog preset * feat: update padding, width, and change font to mono * feat: refactor to use DialogProvider * chore: remove extra args * feat: update CHANGELOG.md, add title, and add button * refactor: use hook * chore: fix typo
This commit is contained in:
38
src/stories/components/ChangelogPopup.stories.tsx
Normal file
38
src/stories/components/ChangelogPopup.stories.tsx
Normal file
@@ -0,0 +1,38 @@
|
||||
import type { Meta, StoryObj } from '@storybook/react';
|
||||
import { Button } from '@views/components/common/Button';
|
||||
import ChangelogPopup from '@views/components/common/ChangelogPopup';
|
||||
import DialogProvider from '@views/components/common/DialogProvider/DialogProvider';
|
||||
import useChangelog from '@views/hooks/useChangelog';
|
||||
import React from 'react';
|
||||
|
||||
const meta = {
|
||||
title: 'Components/Common/ChangelogPopup',
|
||||
component: ChangelogPopup,
|
||||
parameters: {
|
||||
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
|
||||
layout: 'centered',
|
||||
},
|
||||
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
||||
tags: ['autodocs'],
|
||||
} satisfies Meta<typeof ChangelogPopup>;
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof meta>;
|
||||
|
||||
export const Primary: Story = {
|
||||
render: () => (
|
||||
<DialogProvider>
|
||||
<InnerComponent />
|
||||
</DialogProvider>
|
||||
),
|
||||
};
|
||||
|
||||
const InnerComponent = () => {
|
||||
const handleOnClick = useChangelog();
|
||||
|
||||
return (
|
||||
<Button variant='filled' color='ut-burntorange' onClick={handleOnClick}>
|
||||
Open Changelog Popup
|
||||
</Button>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user