diff --git a/CHANGELOG.md b/CHANGELOG.md index 83ca22b76..e2da2acdf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ # CHANGELOG +## Not released +- Added meta value version to List component [#31](https://github.com/CartoDB/carto-react-lib/pull/31) + ## 1.0.0-beta6 (2020-11-27) - Fix CategoryWidgetUI displaying no data while loading [#26](https://github.com/CartoDB/carto-react-lib/pull/26) - Animate CategoryWidget values [#30](https://github.com/CartoDB/carto-react-lib/pull/30) @@ -7,7 +10,6 @@ - Fix CategoryWidgetUI keeping the order for blocked categories [#32](https://github.com/CartoDB/carto-react-lib/pull/32) - Fix bar size in CategoryWidget [#33](https://github.com/CartoDB/carto-react-lib/pull/33) - ## 1.0.0-beta5 (2020-11-25) - Fix addSource keeping optional credentials property in the payload [#24](https://github.com/CartoDB/carto-react-lib/pull/24) diff --git a/src/ui/stories/common/List.stories.js b/src/ui/stories/common/List.stories.js index a19119bf7..ca0cdbf13 100644 --- a/src/ui/stories/common/List.stories.js +++ b/src/ui/stories/common/List.stories.js @@ -1,6 +1,7 @@ import React from 'react'; import { Avatar, + Box, Checkbox, Collapse, Divider, @@ -12,6 +13,7 @@ import { ListItemIcon, ListItemSecondaryAction, ListItemText, + Typography, makeStyles, Switch, Paper, @@ -154,6 +156,66 @@ const Template = ({ secondary, ...args }) => { ); }; +const TemplateMetaValue = ({ secondary, ...args }) => { + const classes = useStyles(); + + const MetaValueLabel = ({ value }) => { + return ( + + {value} + + ); + }; + + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); +}; + const TemplateSecondaryActions = ({ ...args }) => { const classes = useStyles(); @@ -334,4 +396,7 @@ TwoLines.args = { secondary: 'Secondary text' }; export const SecondaryActions = TemplateSecondaryActions.bind({}); +export const MetaValue = TemplateMetaValue.bind({}); +MetaValue.args = { secondary: 'Secondary text too long here', metaValue: '$1,234.87' }; + export const NestedOptions = TemplateNested.bind({});