Skip to content

Commit

Permalink
Add IconAngleUp component
Browse files Browse the repository at this point in the history
  • Loading branch information
minevala committed Jan 19, 2023
1 parent c447533 commit 06f6b25
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 36 deletions.
9 changes: 0 additions & 9 deletions packages/web-components/src/icons/IconAngleUp.svg

This file was deleted.

45 changes: 45 additions & 0 deletions packages/web-components/src/icons/IconAngleUp.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { LitElement, css, html, PropertyValueMap, CSSResultGroup } from 'lit';
// eslint-disable-next-line import/extensions
import { customElement } from 'lit/decorators.js';

import classNames from '../utils/className';
import iconStyles from './icon.scss';

@customElement('hds-icon-angle-up')
export class IconAngleUp extends LitElement {
size: string; // SizeType = 'm';

static readonly styles = [
css`
${iconStyles as unknown as CSSResultGroup}
`,
];

static get properties() {
return {
size: { type: String },
};
}

render() {
return html`
<svg
class="${classNames('hds-icon', 'icon', `hds-icon--size-${this.size || 'm'}`)}"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
role="img"
>
<g fill="none" fill-rule="evenodd">
<path d="M0 24h24V0H0z" />
<path fill="currentColor" d="M12 11.5l5 5 1.5-1.5L12 8.5 5.5 15 7 16.5z" />
</g>
</svg>
`;
}
}

declare global {
interface HTMLElementTagNameMap {
'hds-icon-angle-up': IconAngleUp;
}
}
4 changes: 4 additions & 0 deletions packages/web-components/src/icons/icon.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.icon {
composes: hds-icon from 'hds-core/lib/icons/icon.css';
background-color: transparent !important;
}
25 changes: 0 additions & 25 deletions packages/web-components/src/icons/icons.css

This file was deleted.

3 changes: 1 addition & 2 deletions packages/web-components/src/icons/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import * as x from './icons.css'
export { IconAngleUp } from './IconAngleUp'

export default x

0 comments on commit 06f6b25

Please sign in to comment.