diff --git a/src/collections/sistent/components/table/code.mdx b/src/collections/sistent/components/table/code.mdx new file mode 100644 index 0000000000000..b2ff4319c7341 --- /dev/null +++ b/src/collections/sistent/components/table/code.mdx @@ -0,0 +1,155 @@ +--- +title: Table Code +component: table +description: Tables are used to organize and display structured data in rows and columns. +--- + +Tables help display structured data in an organized and readable format. + + +

Basic Table

+
+ +Basic tables are used to display simple structured data. + +
+
+ + + + + + + + + + + + + + + + +
NameRoleStatus
User 1ContributorActive
+
+
+ + + + + + + + + + + + + + + + + +
NameRoleStatus
User 1ContributorActive
+`} + /> +
+ + +

Striped Table

+
+ +Striped tables improve readability by alternating row colors. + +
+
+ + + + + + + + + + + + + + +
NameRole
User 1Contributor
+
+
+ + + + + + + + + + + + + + + +
NameRole
User 1Contributor
+`} + /> +
+ + +

Compact Table

+
+ +Compact tables are useful when displaying dense data. + +
+
+ + + + + + + + + + + + + + +
NameRole
User 1Contributor
+
+
+ + + + + + + + + + + + + + + +
NameRole
User 1Contributor
+`} + /> +
\ No newline at end of file diff --git a/src/collections/sistent/components/table/guidance.mdx b/src/collections/sistent/components/table/guidance.mdx new file mode 100644 index 0000000000000..a7b914b36f38c --- /dev/null +++ b/src/collections/sistent/components/table/guidance.mdx @@ -0,0 +1,59 @@ +--- +title: Table Guidance +component: table +description: Guidelines and best practices for using tables effectively. +--- + +## Function + +Tables are used to organize structured data into rows and columns. They help users quickly scan, compare, and understand information. + +Tables are useful for: + +- Presenting structured data +- Comparing multiple values +- Displaying logs and metrics +- Listing users or resources + +--- + +## Usage + +Use tables when: + +- Data must be compared +- Information is structured +- Users need quick scanning +- Displaying rows and columns + +Avoid using tables when: + +- Content is mostly text +- Layout is simple +- Data does not require comparison + +--- + +## Best Practices + +Follow these best practices when using tables: + +- Use clear headers +- Avoid too many columns +- Keep rows readable +- Use pagination for large datasets +- Maintain consistent spacing + +### Use Clear Headers + +Always include headers for better readability. + +```html + + + + + + + +
NameRole
\ No newline at end of file diff --git a/src/collections/sistent/components/table/index.mdx b/src/collections/sistent/components/table/index.mdx new file mode 100644 index 0000000000000..32098d060050d --- /dev/null +++ b/src/collections/sistent/components/table/index.mdx @@ -0,0 +1,78 @@ +--- +name: "Table" +title: Table +published: true +component: table +description: A table is used to organize and display structured data in rows and columns. +--- + +Tables are used to present structured data in a clear and organized way. They help users scan information quickly, compare values, and understand relationships between data. + + + +## Types + +Different types of tables help present information based on use cases and data complexity. + +### Basic Table + +Basic tables are used to display structured data in rows and columns. + + + + + + + + + + + + + + + + +
NameRoleStatus
User 1ContributorActive
+ +### Striped Table + +Striped tables improve readability by alternating row colors. + + + + + + + + + + + + + + +
NameRole
User 1Contributor
+ + + +## Usage + +Tables should be used when: + +- Displaying structured data +- Comparing values +- Showing logs or metrics +- Listing users or resources + + + +## Best Practices + +Best practices for using tables: + +- Use headers for clarity +- Avoid too many columns +- Keep rows readable +- Use pagination for large datasets +- Maintain consistent spacing \ No newline at end of file diff --git a/src/components/SistentNavigation/content.js b/src/components/SistentNavigation/content.js index 5b6acd280869f..1495d3215bbe2 100644 --- a/src/components/SistentNavigation/content.js +++ b/src/components/SistentNavigation/content.js @@ -137,27 +137,31 @@ export const content = [ { id: 101, link: "/projects/sistent/components/switch/guidance", text: "Switch" }, { id: 102, link: "/projects/sistent/components/switch/code", text: "Switch" }, - { id: 103, link: "/projects/sistent/components/tabs", text: "Tabs" }, - { id: 104, link: "/projects/sistent/components/tabs/guidance", text: "Tabs" }, - { id: 105, link: "/projects/sistent/components/tabs/code", text: "Tabs" }, + { id: 103, link: "/projects/sistent/components/table", text: "Table" }, + { id: 104, link: "/projects/sistent/components/table/guidance", text: "Table" }, + { id: 105, link: "/projects/sistent/components/table/code", text: "Table" }, - { id: 106, link: "/projects/sistent/components/text-field", text: "Text Field" }, - { id: 107, link: "/projects/sistent/components/text-field/guidance", text: "Text Field" }, - { id: 108, link: "/projects/sistent/components/text-field/code", text: "Text Field" }, + { id: 106, link: "/projects/sistent/components/tabs", text: "Tabs" }, + { id: 107, link: "/projects/sistent/components/tabs/guidance", text: "Tabs" }, + { id: 108, link: "/projects/sistent/components/tabs/code", text: "Tabs" }, - { id: 109, link: "/projects/sistent/components/text-input", text: "Text Input" }, - { id: 110, link: "/projects/sistent/components/text-input/guidance", text: "Text Input" }, - { id: 111, link: "/projects/sistent/components/text-input/code", text: "Text Input" }, + { id: 109, link: "/projects/sistent/components/text-field", text: "Text Field" }, + { id: 110, link: "/projects/sistent/components/text-field/guidance", text: "Text Field" }, + { id: 111, link: "/projects/sistent/components/text-field/code", text: "Text Field" }, - { id: 112, link: "/projects/sistent/components/toggle-button", text: "Toggle Button" }, - { id: 113, link: "/projects/sistent/components/toggle-button/guidance", text: "Toggle Button" }, - { id: 114, link: "/projects/sistent/components/toggle-button/code", text: "Toggle Button" }, + { id: 112, link: "/projects/sistent/components/text-input", text: "Text Input" }, + { id: 113, link: "/projects/sistent/components/text-input/guidance", text: "Text Input" }, + { id: 114, link: "/projects/sistent/components/text-input/code", text: "Text Input" }, - { id: 115, link: "/projects/sistent/components/toolbar", text: "Toolbar" }, - { id: 116, link: "/projects/sistent/components/toolbar/guidance", text: "Toolbar" }, - { id: 117, link: "/projects/sistent/components/toolbar/code", text: "Toolbar" }, + { id: 115, link: "/projects/sistent/components/toggle-button", text: "Toggle Button" }, + { id: 116, link: "/projects/sistent/components/toggle-button/guidance", text: "Toggle Button" }, + { id: 117, link: "/projects/sistent/components/toggle-button/code", text: "Toggle Button" }, - { id: 118, link: "/projects/sistent/components/tooltip", text: "Tooltip" }, - { id: 119, link: "/projects/sistent/components/tooltip/guidance", text: "Tooltip" }, - { id: 120, link: "/projects/sistent/components/tooltip/code", text: "Tooltip" }, + { id: 118, link: "/projects/sistent/components/toolbar", text: "Toolbar" }, + { id: 119, link: "/projects/sistent/components/toolbar/guidance", text: "Toolbar" }, + { id: 120, link: "/projects/sistent/components/toolbar/code", text: "Toolbar" }, + + { id: 121, link: "/projects/sistent/components/tooltip", text: "Tooltip" }, + { id: 122, link: "/projects/sistent/components/tooltip/guidance", text: "Tooltip" }, + { id: 123, link: "/projects/sistent/components/tooltip/code", text: "Tooltip" }, ];