Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Carina Ursu <[email protected]>
  • Loading branch information
ursucarina committed May 4, 2022
1 parent 4abde81 commit fadcf19
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,23 @@ const stories = storiesOf('Literals/Collection', module);
stories.addDecorator(CardDecorator);

function renderCollection(label: string, collection: LiteralCollection) {
const map = { literals: { [label]: { collection, value: 'collection' } } };
return (
<>
<div style={{ display: 'flex' }}>
<div style={{ marginRight: '16px' }}>
OLD
<Card>
<CardContent>
<DeprecatedLiteralMapViewer
map={{ literals: { [label]: { collection, value: 'collection' } } }}
/>
<DeprecatedLiteralMapViewer map={map} />
</CardContent>
</Card>
</div>
<div>
NEW
<Card>
<CardContent>
<LiteralMapViewer
map={{ literals: { [label]: { collection, value: 'collection' } } }}
/>
<LiteralMapViewer map={map} />
</CardContent>
</Card>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,23 @@ const stories = storiesOf('Literals/Map', module);
stories.addDecorator(CardDecorator);

function renderMap(label: string, map: LiteralMap) {
const fullMap = { literals: { [label]: { map, value: 'map' } } };
return (
<>
<div style={{ display: 'flex' }}>
<div style={{ marginRight: '16px' }}>
OLD
<Card>
<CardContent>
<DeprecatedLiteralMapViewer map={{ literals: { [label]: { map, value: 'map' } } }} />
<DeprecatedLiteralMapViewer map={fullMap} />
</CardContent>
</Card>
</div>
<div>
NEW
<Card>
<CardContent>
<LiteralMapViewer map={{ literals: { [label]: { map, value: 'map' } } }} />
<LiteralMapViewer map={fullMap} />
</CardContent>
</Card>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,27 @@ const stories = storiesOf('Literals/ProtobufStruct', module);
stories.addDecorator(CardDecorator);

function renderStruct(label: string, struct: ProtobufStruct) {
const map = {
literals: {
[label]: { scalar: { value: 'generic', generic: struct }, value: 'scalar' },
},
};
return (
<>
<div style={{ display: 'flex' }}>
<div style={{ marginRight: '16px' }}>
OLD
<Card>
<CardContent>
<DeprecatedLiteralMapViewer
map={{
literals: {
[label]: { scalar: { value: 'generic', generic: struct }, value: 'scalar' },
},
}}
/>
<DeprecatedLiteralMapViewer map={map} />
</CardContent>
</Card>
</div>
<div>
NEW
<Card>
<CardContent>
<LiteralMapViewer
map={{
literals: {
[label]: { scalar: { value: 'generic', generic: struct }, value: 'scalar' },
},
}}
/>
<LiteralMapViewer map={map} />
</CardContent>
</Card>
</div>
Expand Down

0 comments on commit fadcf19

Please sign in to comment.