Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/Hits/__tests__/__snapshots__/Hits-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ exports[`Hits markup should render <Hits /> without highlight function 1`] = `
className="item"
dangerouslySetInnerHTML={
Object {
"__html": "<mark class=\\"ais-HighLight-highlighted\\">name 1</mark>",
"__html": "<mark class=\\"ais-Highlight-highlighted\\">name 1</mark>",
}
}
/>
<li
className="item"
dangerouslySetInnerHTML={
Object {
"__html": "<mark class=\\"ais-HighLight-highlighted\\">name 2</mark>",
"__html": "<mark class=\\"ais-Highlight-highlighted\\">name 2</mark>",
}
}
/>
Expand Down
6 changes: 3 additions & 3 deletions src/helpers/__tests__/highlight-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe('highlight', () => {
hit,
})
).toMatchInlineSnapshot(
`"<mark class=\\"ais-HighLight-highlighted\\">Amazon</mark> - Fire TV Stick with Alexa Voice Remote - Black"`
`"<mark class=\\"ais-Highlight-highlighted\\">Amazon</mark> - Fire TV Stick with Alexa Voice Remote - Black"`
);
});

Expand All @@ -86,7 +86,7 @@ describe('highlight', () => {
hit,
})
).toMatchInlineSnapshot(
`"Enjoy smart access to videos, games and apps with this <em class=\\"ais-HighLight-highlighted\\">Amazon</em> Fire TV stick. Its Alexa voice remote lets you deliver hands-free commands when you want to watch television or engage with other applications. With a quad-core processor, 1GB internal memory and 8GB of storage, this portable <em class=\\"ais-HighLight-highlighted\\">Amazon</em> Fire TV stick works fast for buffer-free streaming."`
`"Enjoy smart access to videos, games and apps with this <em class=\\"ais-Highlight-highlighted\\">Amazon</em> Fire TV stick. Its Alexa voice remote lets you deliver hands-free commands when you want to watch television or engage with other applications. With a quad-core processor, 1GB internal memory and 8GB of storage, this portable <em class=\\"ais-Highlight-highlighted\\">Amazon</em> Fire TV stick works fast for buffer-free streaming."`
);
});

Expand All @@ -106,7 +106,7 @@ describe('highlight', () => {
hit,
})
).toMatchInlineSnapshot(
`"Nested <mark class=\\"ais-HighLight-highlighted\\">Amazon</mark> name"`
`"Nested <mark class=\\"ais-Highlight-highlighted\\">Amazon</mark> name"`
);
});
});
2 changes: 1 addition & 1 deletion src/helpers/highlight.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getPropertyByPath } from '../lib/utils';
import { component } from '../lib/suit';

const suit = component('HighLight');
const suit = component('Highlight');

export default function highlight({
attribute,
Expand Down
2 changes: 1 addition & 1 deletion storybook/app/builtin/stories/hits.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default () => {
container,
templates: {
item:
'{{#helpers.highlight}}{ "attribute": "name", "highlightedTagName": "mark" }{{/helpers.highlight}}',
'{{#helpers.highlight}}{ "attribute": "name" }{{/helpers.highlight}}',
},
})
);
Expand Down