From 6b93032a78a3c6ee74e28901a0f0169e7455a5d0 Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Thu, 6 May 2021 16:57:49 -0400 Subject: [PATCH] style: Update Rose::Table storybook --- .../components/rose/table/index.stories.mdx | 107 +++++++++++++++++- 1 file changed, 101 insertions(+), 6 deletions(-) diff --git a/addons/rose/addon/components/rose/table/index.stories.mdx b/addons/rose/addon/components/rose/table/index.stories.mdx index a720bd877..a6a840401 100644 --- a/addons/rose/addon/components/rose/table/index.stories.mdx +++ b/addons/rose/addon/components/rose/table/index.stories.mdx @@ -1,11 +1,14 @@ import { Meta, Story, Preview } from '@storybook/addon-docs/blocks'; import { hbs } from 'ember-cli-htmlbars'; +import { boolean, select } from '@storybook/addon-knobs'; # Table -A table component to display data in structure of rows and columns. It supports `header`, `body` and `footer` optional definitions. Each definition allows for a table `row` to be defined with either a `cell` or `headerCell` table element. +A table component to display data in structure of rows and columns. It supports `header`, `body` and `footer` optional definitions. Each definition allows for a table `row` to be defined with either a `cell` or `headerCell` table element. Rows can be visually hidden, cells can be expanded to fit full width, and center/right cell alignment is supported. + +Cell expansion style should be applied to only one cell in a row. ```htmlbars @@ -24,6 +27,18 @@ A table component to display data in structure of rows and columns. It supports optional name description + + 1.1.1.1 + host-set-2 + optional name + description + + + 1.1.1.1 + host-set-1 + optional name + description + @@ -36,11 +51,11 @@ A table component to display data in structure of rows and columns. It supports {{ template: hbs` - + - + Address - Host Set + Host Set Name Description @@ -48,7 +63,19 @@ A table component to display data in structure of rows and columns. It supports 1.1.1.1 - host-set-1, host-set-2 + host-set-1, host-set-2 + optional name + description + + + 1.1.1.1 + host-set-2 + optional name + description + + + 1.1.1.1 + host-set-1 optional name description @@ -60,6 +87,74 @@ A table component to display data in structure of rows and columns. It supports `, - context: {} + context: { + visuallyHideHeaderRow: boolean('visuallyHideHeaderRow', false), + cellStyle: select( + 'cellStyle', + { + default: '', + 'expand': 'expand' + } + ), + style: select( + 'style', + { + 'default': '', + 'condensed': 'condensed' + } + ) + }, + }} + + + + {{ + template: hbs` + + + + Key + Value + + + + + Key + Value + + + Key + Value + + + Key + Value + + + Key + + + + Add + + + + + Key + + + + Remove + + + + + + + Footer + + + + `, }}