-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update subnet table layout (#5226)
- Loading branch information
1 parent
d1ccfb5
commit f365399
Showing
14 changed files
with
561 additions
and
290 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { Meta } from "@storybook/react"; | ||
|
||
import GroupRow from "./GroupRow"; | ||
|
||
const meta: Meta<typeof GroupRow> = { | ||
title: "Components/GroupRow", | ||
component: GroupRow, | ||
tags: ["autodocs"], | ||
}; | ||
|
||
export default meta; | ||
|
||
export const Example = { | ||
args: { | ||
itemName: "network", | ||
groupName: "fabric", | ||
count: 2, | ||
}, | ||
}; |
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,27 @@ | ||
import pluralize from "pluralize"; | ||
|
||
import DoubleRow from "app/base/components/DoubleRow"; | ||
|
||
export enum Label { | ||
HideGroup = "Hide", | ||
ShowGroup = "Show", | ||
} | ||
|
||
type GroupRowProps = { | ||
itemName: string; | ||
groupName: string; | ||
count: number; | ||
}; | ||
|
||
const GroupRow = ({ itemName, groupName, count }: GroupRowProps) => { | ||
return ( | ||
<> | ||
<DoubleRow | ||
primary={<strong>{groupName}</strong>} | ||
secondary={<span>{pluralize(itemName, count, true)}</span>} | ||
/> | ||
</> | ||
); | ||
}; | ||
|
||
export default GroupRow; |
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 @@ | ||
export { default } from "./GroupRow"; |
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.