-
Notifications
You must be signed in to change notification settings - Fork 18
Added small table variant website doc #1831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
f1dccef
Separated website doc from lib changes
Mil4n0r c803d9d
Updated example
Mil4n0r 6bb7b8a
Merge branch 'master' into Mil4n0r/small_table_variant-doc
Mil4n0r 5a2e33d
Updated package and examples
Mil4n0r ae25965
Merge branch 'Mil4n0r/small_table_variant-doc' of github.com:dxc-tech…
Mil4n0r 74f2a67
Merge branch 'master' into Mil4n0r/small_table_variant-doc
Mil4n0r 172bd05
Updated examples, pending lib update
Mil4n0r 9dfb247
Merge with master
Mil4n0r 0267b2e
Updated package
Mil4n0r bf3dad5
Updated resultset table examples
Mil4n0r b13b54a
Updated package
Mil4n0r d7316ff
Fixed description for table modes
Mil4n0r 9921415
Fixed description for resultsettable modes
Mil4n0r 67b0ef6
Removed unused components
Mil4n0r 56548a0
Updated table doc based on new tokens
Mil4n0r 671b394
Merge branch 'master' into Mil4n0r/small_table_variant-doc
Mil4n0r afcd9fb
Updated package
Mil4n0r f1e1e57
Revert changes from basic table examples
Mil4n0r File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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
11 changes: 3 additions & 8 deletions
11
website/screens/components/resultset-table/code/examples/Icons.tsx
This file contains hidden or 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,14 +1,9 @@ | ||
| import React from "react"; | ||
|
|
||
| export const deleteIcon = ( | ||
| <svg | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| height="24" | ||
| viewBox="0 0 24 24" | ||
| width="24" | ||
| fill="white" | ||
| > | ||
| <path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z" /> | ||
| <svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"> | ||
| <path fill="currentColor" d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z" /> | ||
| <path d="M0 0h24v24H0z" fill="none" /> | ||
| </svg> | ||
| ); | ||
|
|
79 changes: 79 additions & 0 deletions
79
website/screens/components/resultset-table/code/examples/reduced.ts
This file contains hidden or 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,79 @@ | ||
| import { | ||
| DxcResultsetTable, | ||
| DxcInset, | ||
| } from "@dxc-technology/halstack-react"; | ||
| import { deleteIcon } from "./Icons"; | ||
|
|
||
| const code = `() => { | ||
| const columns = [ | ||
| { displayValue: "Id"}, | ||
| { displayValue: "Name"}, | ||
| { displayValue: "City"}, | ||
| { displayValue: "Actions"}, | ||
| ]; | ||
|
|
||
| const actions = [ | ||
| { | ||
| icon: deleteIcon, | ||
| title: "icon", | ||
| onClick: () => {}, | ||
| }, | ||
| ]; | ||
|
|
||
| const rows = [ | ||
| [ | ||
| { displayValue: "001"}, | ||
| { displayValue: "Peter"}, | ||
| { displayValue: "Miami"}, | ||
| { displayValue: <DxcResultsetTable.ActionsCell actions={actions} /> }, | ||
| ], | ||
| [ | ||
| { displayValue: "002"}, | ||
| { displayValue: "Louis"}, | ||
| { displayValue: "London"}, | ||
| { displayValue: <DxcResultsetTable.ActionsCell actions={actions} /> }, | ||
| ], | ||
| [ | ||
| { displayValue: "003"}, | ||
| { displayValue: "Lana"}, | ||
| { displayValue: "Amsterdam"}, | ||
| { displayValue: <DxcResultsetTable.ActionsCell actions={actions} /> }, | ||
| ], | ||
| [ | ||
| { displayValue: "004"}, | ||
| { displayValue: "Rick"}, | ||
| { displayValue: "London"}, | ||
| { displayValue: <DxcResultsetTable.ActionsCell actions={actions} /> }, | ||
| ], | ||
| [ | ||
| { displayValue: "005"}, | ||
| { displayValue: "Mark"}, | ||
| { displayValue: "Miami"}, | ||
| { displayValue: <DxcResultsetTable.ActionsCell actions={actions} /> }, | ||
| ], | ||
| [ | ||
| { displayValue: "006"}, | ||
| { displayValue: "Cris"}, | ||
| { displayValue: "Paris"}, | ||
| { displayValue: <DxcResultsetTable.ActionsCell actions={actions} /> }, | ||
| ], | ||
| ]; | ||
|
|
||
| return ( | ||
| <DxcInset space="2rem"> | ||
| <DxcResultsetTable | ||
| columns={columns} | ||
| rows={rows} | ||
| mode="reduced" | ||
| ></DxcResultsetTable> | ||
| </DxcInset> | ||
| ); | ||
| }`; | ||
|
|
||
| const scope = { | ||
| DxcResultsetTable, | ||
| DxcInset, | ||
| deleteIcon, | ||
| }; | ||
|
|
||
| export default { code, scope }; | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.