-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: improve asset list components (#129)
* feat: add Skeleton component * fix: incorrect implementation of ShowMore and rename to Reveal * fix: improve
- Loading branch information
Showing
39 changed files
with
623 additions
and
391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import React from "react"; | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
|
||
import Reveal from "../src/ui/reveal"; | ||
import Stack from "../src/ui/stack"; | ||
import Skeleton from "../src/ui/skeleton"; | ||
|
||
const meta: Meta<typeof Reveal> = { | ||
component: Reveal, | ||
title: "Reveal", | ||
tags: ["autodocs"], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Primary: Story = { | ||
args: { | ||
children: ( | ||
<Stack | ||
direction="vertical" | ||
space="$5" | ||
attributes={{ | ||
p: "$4", | ||
borderRadius: "$md", | ||
borderColor: "$divider", | ||
borderWidth: "1px", | ||
borderStyle: "solid", | ||
}} | ||
> | ||
{Array.from(Array(20).keys()).map((item, i) => ( | ||
<Skeleton | ||
key={`${item}`} | ||
borderRadius="$sm" | ||
width="$full" | ||
height="$10" | ||
/> | ||
))} | ||
</Stack> | ||
), | ||
showMoreLabel: "Show more", | ||
showLessLabel: "Show less", | ||
hideThresholdHeight: 400, | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import * as React from "react"; | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
|
||
import Box from "../src/ui/box"; | ||
import Skeleton from "../src/ui/skeleton"; | ||
|
||
const meta: Meta<typeof Box> = { | ||
component: Box, | ||
title: "Skeleton", | ||
tags: ["autodocs"], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Primary: Story = { | ||
args: {}, | ||
render: (props) => { | ||
return ( | ||
<Box display="flex" flexDirection="column" gap="$4"> | ||
<Skeleton borderRadius="$sm" width="$26" height="$10" /> | ||
<Skeleton borderRadius="$sm" width="$30" height="$10" /> | ||
<Skeleton borderRadius="$sm" width="$20" height="$10" /> | ||
</Box> | ||
); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.