Skip to content
Snippets Groups Projects
Unverified Commit 2eee1986 authored by Camille Villa's avatar Camille Villa Committed by GitHub
Browse files

Merge pull request #1946 from ProjectMirador/add-typography-to-metadata

adds Typography to metadata panel for themeability
parents 5be2cf57 acdb28ec
No related branches found
No related tags found
No related merge requests found
...@@ -52,15 +52,17 @@ describe('WindowSideBarInfoPanel', () => { ...@@ -52,15 +52,17 @@ describe('WindowSideBarInfoPanel', () => {
it('renders canvas metadata in LabelValueMetadata component', () => { it('renders canvas metadata in LabelValueMetadata component', () => {
expect( expect(
wrapper.find(LabelValueMetadata).at(0).matchesElement( wrapper.find(Typography).at(3).matchesElement(
<LabelValueMetadata labelValuePairs={metadata} />, <Typography>
<LabelValueMetadata labelValuePairs={metadata} />
</Typography>,
), ),
).toBe(true); ).toBe(true);
}); });
it('renders manifest label', () => { it('renders manifest label', () => {
expect( expect(
wrapper.find(Typography).at(3).matchesElement( wrapper.find(Typography).at(4).matchesElement(
<Typography>The Manifest Label</Typography>, <Typography>The Manifest Label</Typography>,
), ),
).toBe(true); ).toBe(true);
...@@ -68,7 +70,7 @@ describe('WindowSideBarInfoPanel', () => { ...@@ -68,7 +70,7 @@ describe('WindowSideBarInfoPanel', () => {
it('renders manifest description in SanitizedHtml component', () => { it('renders manifest description in SanitizedHtml component', () => {
expect( expect(
wrapper.find(Typography).at(4).matchesElement( wrapper.find(Typography).at(5).matchesElement(
<Typography> <Typography>
<SanitizedHtml htmlString="The Manifest Description" ruleSet="iiif" /> <SanitizedHtml htmlString="The Manifest Description" ruleSet="iiif" />
</Typography>, </Typography>,
...@@ -78,8 +80,10 @@ describe('WindowSideBarInfoPanel', () => { ...@@ -78,8 +80,10 @@ describe('WindowSideBarInfoPanel', () => {
it('renders manifest metadata in LabelValueMetadata component', () => { it('renders manifest metadata in LabelValueMetadata component', () => {
expect( expect(
wrapper.find(LabelValueMetadata).at(1).matchesElement( wrapper.find(Typography).at(6).matchesElement(
<LabelValueMetadata labelValuePairs={metadata} />, <Typography>
<LabelValueMetadata labelValuePairs={metadata} />
</Typography>,
), ),
).toBe(true); ).toBe(true);
}); });
......
...@@ -47,7 +47,9 @@ class WindowSideBarInfoPanel extends Component { ...@@ -47,7 +47,9 @@ class WindowSideBarInfoPanel extends Component {
)} )}
{canvasMetadata.length > 0 && ( {canvasMetadata.length > 0 && (
<Typography variant="body2">
<LabelValueMetadata labelValuePairs={canvasMetadata} /> <LabelValueMetadata labelValuePairs={canvasMetadata} />
</Typography>
)} )}
<Divider /> <Divider />
...@@ -65,7 +67,9 @@ class WindowSideBarInfoPanel extends Component { ...@@ -65,7 +67,9 @@ class WindowSideBarInfoPanel extends Component {
)} )}
{manifestMetadata.length > 0 && ( {manifestMetadata.length > 0 && (
<Typography variant="body2">
<LabelValueMetadata labelValuePairs={manifestMetadata} /> <LabelValueMetadata labelValuePairs={manifestMetadata} />
</Typography>
)} )}
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment