Fix Inbox storybook
This commit is contained in:
parent
0ab8ec34d0
commit
19049c252e
4 changed files with 13 additions and 5 deletions
|
@ -21,7 +21,10 @@ export default {
|
|||
hasInitialLoadCompleted: false,
|
||||
isCustomizingPreferredReactions: false,
|
||||
},
|
||||
} satisfies Meta<PropsType>;
|
||||
argTypes: {
|
||||
daysAgo: { control: { type: 'number' } },
|
||||
},
|
||||
} satisfies Meta<PropsType & { daysAgo?: number }>;
|
||||
|
||||
// eslint-disable-next-line react/function-component-definition
|
||||
const Template: StoryFn<PropsType & { daysAgo?: number }> = ({
|
||||
|
@ -32,7 +35,7 @@ const Template: StoryFn<PropsType & { daysAgo?: number }> = ({
|
|||
const [dayOffset, setDayOffset] = useState(0);
|
||||
|
||||
useEffect(() => {
|
||||
if (daysAgo === undefined) {
|
||||
if (!daysAgo) {
|
||||
setDayOffset(0);
|
||||
return noop;
|
||||
}
|
||||
|
@ -64,3 +67,8 @@ const Template: StoryFn<PropsType & { daysAgo?: number }> = ({
|
|||
};
|
||||
|
||||
export const Default = Template.bind({});
|
||||
|
||||
export const FourDaysAgo = Template.bind({});
|
||||
FourDaysAgo.args = {
|
||||
daysAgo: 4,
|
||||
};
|
||||
|
|
|
@ -128,7 +128,7 @@ export function Inbox({
|
|||
|
||||
<div className="module-splash-screen__logo module-img--150" />
|
||||
{envelopeTimestamp === undefined ? (
|
||||
<div className="container">
|
||||
<div className="dot-container">
|
||||
<span className="dot" />
|
||||
<span className="dot" />
|
||||
<span className="dot" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue