@elvia/elvis-breadcrumb
Advanced tools
Comparing version 1.2.5 to 1.3.0
# Elvia Breadcrumbs | ||
## 1.3.0 (07.02.22) | ||
### New feature | ||
- Added inlineStyle and className props | ||
## 1.2.5 (28.01.22) | ||
@@ -4,0 +10,0 @@ |
declare module '*'; |
@@ -11,2 +11,4 @@ /* | ||
breadcrumbsOnChange, | ||
className, | ||
inlineStyle, | ||
webcomponent | ||
@@ -97,2 +99,5 @@ }) => { | ||
return /*#__PURE__*/React.createElement(BreadcrumbWrapper, { | ||
className: `${className ? className : ''}`, | ||
style: inlineStyle, | ||
"data-testid": "breadcrumb-wrapper", | ||
"aria-label": "Breadcrumbs" | ||
@@ -99,0 +104,0 @@ }, breadcrumb); |
@@ -10,3 +10,3 @@ /* | ||
static get observedAttributes() { | ||
return ["breadcrumbs"]; | ||
return ["breadcrumbs", "classname", "inlinestyle"]; | ||
} | ||
@@ -22,2 +22,10 @@ | ||
"propType": "object" | ||
}, { | ||
"name": "className", | ||
"type": "string", | ||
"propType": "string | undefined" | ||
}, { | ||
"name": "inlineStyle", | ||
"type": "object", | ||
"propType": "object | undefined" | ||
}], | ||
@@ -41,2 +49,42 @@ "reactName": "Breadcrumb", | ||
set className(newValue) { | ||
super.setProps({ | ||
'classname': newValue | ||
}); | ||
} | ||
get className() { | ||
return super.getProps()['classname']; | ||
} | ||
set classname(newValue) { | ||
super.setProps({ | ||
'classname': newValue | ||
}); | ||
} | ||
get classname() { | ||
return super.getProps()['classname']; | ||
} | ||
set inlineStyle(newValue) { | ||
super.setProps({ | ||
'inlinestyle': newValue | ||
}); | ||
} | ||
get inlineStyle() { | ||
return super.getProps()['inlinestyle']; | ||
} | ||
set inlinestyle(newValue) { | ||
super.setProps({ | ||
'inlinestyle': newValue | ||
}); | ||
} | ||
get inlinestyle() { | ||
return super.getProps()['inlinestyle']; | ||
} | ||
constructor() { | ||
@@ -43,0 +91,0 @@ super(ElviaComponent, ReactComponent['Breadcrumb'], style); |
{ | ||
"name": "@elvia/elvis-breadcrumb", | ||
"version": "1.2.5", | ||
"version": "1.3.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
export { default as Breadcrumb } from './dist/react/js/elvia-breadcrumb'; |
@@ -0,0 +0,0 @@ # Elvia Breadcrumb |
declare module '*'; |
@@ -25,2 +25,3 @@ import Breadcrumb from './elvia-breadcrumb.tsx'; | ||
let breadcrumbDekstopMultipleLinksThree; | ||
let breadcrumbWrapper; | ||
@@ -59,2 +60,19 @@ describe('Have links', () => { | ||
}); | ||
describe('className and inlineStyle passed to wrapper', () => { | ||
beforeEach(() => { | ||
wrapper = mount( | ||
<Breadcrumb | ||
breadcrumbs={breadcumbsLinksTest} | ||
className="test-class" | ||
inlineStyle={{ margin: '24px' }} | ||
></Breadcrumb>, | ||
); | ||
breadcrumbWrapper = wrapper.find({ 'data-testid': 'breadcrumb-wrapper' }).at(0); | ||
}); | ||
it('should have className and inlineStyle', function (done) { | ||
expect(breadcrumbWrapper.getDOMNode()).toHaveStyle('margin: 24px'); | ||
expect(breadcrumbWrapper.getDOMNode()).toHaveClass('test-class'); | ||
done(); | ||
}); | ||
}); | ||
}); |
export { default as Breadcrumb } from './dist/web_component/js/elvia-breadcrumb'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
20631
13
508