Skip to content

Commit

Permalink
Extract classNames to separate utility
Browse files Browse the repository at this point in the history
  • Loading branch information
minevala committed Jan 19, 2023
1 parent e67e492 commit c447533
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { LitElement, css, html, PropertyValueMap, CSSResultGroup } from 'lit';
import { customElement } from 'lit/decorators.js';
import { toString, uniqueId } from 'lodash';

import classNames from '../../utils/className';
import { AccordionCustomTheme, Language } from './AccordionProps';

import accordionStyles from './accordion.scss';
Expand All @@ -12,9 +13,6 @@ const booleanConverter = {
toAttribute: (value) => toString(value),
};

// FIXME: Remove and import from a common utility file or such
const classNames = (...args) => args.filter(Boolean).join(' ');

const getCloseMessage = (language: Language): string =>
({
en: `Close`,
Expand Down
1 change: 1 addition & 0 deletions packages/web-components/src/utils/className.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default (...args) => args.filter(Boolean).join(' ');

0 comments on commit c447533

Please sign in to comment.