{
>;
/**
- * A method that accepts the data for the row and returns the inner content for the row.
+ * Render function that renders the content for the column to be placed
+ * inside the ``
+ *
+ * Since this is a render function, `React.createElement` will _not_ be
+ * called, nor will propTypes be checked. This is to prevent mounting and
+ * unmounting on each render
*
- * Do not include a ` | ` or a ``, these are handled automatically
+ * Note: the signature of the method is the same as a `map` function
*/
render: (
input: Readonly,
@@ -49,11 +65,25 @@ interface Props {
}[];
/**
- * a field name to key rows on
+ * String or method to calculate the `key` for each row
+ *
+ * When re-ordering rows (by sorting or any other means), this will ensure
+ * that DOM elements are reused correctly.
+ *
+ * Can be a string representing a field in `RowData` (inferred from `data` or
+ * included as a generic to `>`) or a function that takes the
+ * row data and returns a key
*/
keyOn: keyof RowShape | ((row: RowShape) => any);
}
+/**
+ * Tables provide a structure to data and a visual grid making it easier to see
+ * relationships and are one of the most useful tools and formats for organizing
+ * and communiting structured data.
+ *
+ * @see https://zpl.io/bAlrjJe
+ */
export function Table({
data,
density = "standard",
diff --git a/src/Table/table.story/alice-howell.png b/src/Table/table.stories/alice-howell.png
similarity index 100%
rename from src/Table/table.story/alice-howell.png
rename to src/Table/table.stories/alice-howell.png
diff --git a/src/Table/table.story/benjamin-lawrence.png b/src/Table/table.stories/benjamin-lawrence.png
similarity index 100%
rename from src/Table/table.story/benjamin-lawrence.png
rename to src/Table/table.stories/benjamin-lawrence.png
diff --git a/src/Table/table.story/cynthia-bowman.png b/src/Table/table.stories/cynthia-bowman.png
similarity index 100%
rename from src/Table/table.story/cynthia-bowman.png
rename to src/Table/table.stories/cynthia-bowman.png
diff --git a/src/Table/table.story/jeremy-griffin.png b/src/Table/table.stories/jeremy-griffin.png
similarity index 100%
rename from src/Table/table.story/jeremy-griffin.png
rename to src/Table/table.stories/jeremy-griffin.png
diff --git a/src/Table/table.story/jeremy-jacobs.png b/src/Table/table.stories/jeremy-jacobs.png
similarity index 100%
rename from src/Table/table.story/jeremy-jacobs.png
rename to src/Table/table.stories/jeremy-jacobs.png
|