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

[CRA-RXJS-SC]: Add story for Paginate Button #620

Merged
merged 4 commits into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { ComponentStory, ComponentMeta } from '@storybook/react';
import { Routes, Route, MemoryRouter } from 'react-router-dom';
import PaginateButton from './PaginateButton';

export default {
title: 'Repo/PaginateButton',
component: PaginateButton,
} as ComponentMeta<typeof PaginateButton>;

const Template: ComponentStory<typeof PaginateButton> = (args) => (
<MemoryRouter>
<Routes>
<Route path="/" element={<PaginateButton {...args} />}></Route>
</Routes>
</MemoryRouter>
);

export const PaginatePrevButton = Template.bind({});
PaginatePrevButton.args = {
onClick() {},
disabled: false,
children: (
<>
<span className="arrow prev">Prev</span>
</>
),
};

export const PaginateNextButton = Template.bind({});
PaginateNextButton.args = {
onClick() {},
disabled: false,
children: (
<>
<span className="arrow next">Next</span>
</>
),
};
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ export default function PullRequestIssueInfo({
{title}
</a>
<div className="sub_heading">
<span className="opened_num">#{number}</span>
{" "}
<span className="opened_by">by {openedBy}</span>
{" "}
<span className="opened_num">#{number}</span>{' '}
<span className="opened_by">by {openedBy}</span>{' '}
<span className="opened_day">
{buildPrIssueResolution(state)} {format(new Date(created_at), 'MMM dd')}
</span>
Expand Down
Loading