-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui): NoDataPlaceholder signature changed content > children
- Loading branch information
1 parent
e1266d2
commit 95f4542
Showing
12 changed files
with
47 additions
and
23 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
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
15 changes: 12 additions & 3 deletions
15
web/apps/ui-docs/stories/Components/NavigatingButton.stories.ts
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 |
---|---|---|
@@ -1,7 +1,16 @@ | ||
import { NavigatingButton } from "@signalco/ui/dist/NavigatingButton"; | ||
import { StoryObj } from "@storybook/react"; | ||
import { Meta, StoryObj } from "@storybook/react"; | ||
|
||
export default { component: NavigatingButton, tags: ['autodocs'] }; | ||
type Story = StoryObj<typeof NavigatingButton>; | ||
const Component = NavigatingButton; | ||
|
||
export default { | ||
component: Component, | ||
tags: ['autodocs'], | ||
args: { | ||
children: 'Navigate', | ||
href: '#' | ||
} | ||
} satisfies Meta<typeof Component>; | ||
type Story = StoryObj<typeof Component>; | ||
|
||
export const Default: Story = {}; |
8 changes: 5 additions & 3 deletions
8
web/apps/ui-docs/stories/Components/NoDataPlaceholder.stories.ts
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
import { NoDataPlaceholder } from "@signalco/ui/dist/NoDataPlaceholder"; | ||
import { StoryObj } from "@storybook/react"; | ||
import { Meta, StoryObj } from "@storybook/react"; | ||
|
||
export default { component: NoDataPlaceholder, tags: ['autodocs'] }; | ||
type Story = StoryObj<typeof NoDataPlaceholder>; | ||
const Component = NoDataPlaceholder; | ||
|
||
export default { component: Component, tags: ['autodocs'], args: { children: 'No data' } } satisfies Meta<typeof Component>; | ||
type Story = StoryObj<typeof Component>; | ||
|
||
export const Default: Story = {}; |
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 |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
"noEmit": true | ||
}, | ||
"include": [ | ||
"stories" | ||
"stories/**/*.ts", | ||
"stories/**/*.tsx" | ||
] | ||
} |
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
10 changes: 4 additions & 6 deletions
10
web/packages/ui/src/NoDataPlaceholder/NoDataPlaceholder.tsx
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 |
---|---|---|
@@ -1,9 +1,7 @@ | ||
import { Typography } from '../Typography'; | ||
import { Typography, type TypographyProps } from '../Typography'; | ||
|
||
export type NoDataPlaceholderProps = { | ||
content: React.ReactNode | string; | ||
}; | ||
export type NoDataPlaceholderProps = TypographyProps; | ||
|
||
export function NoDataPlaceholder({ content }: NoDataPlaceholderProps) { | ||
return <Typography level="body2">{content}</Typography> | ||
export function NoDataPlaceholder(props: NoDataPlaceholderProps) { | ||
return <Typography level="body2" {...props} /> | ||
} |