import { classNames, callable } from 'mixlea-utils-js';
import { Text } from '@tarojs/components';

import type { MlIconProps, MlIconEnum } from './types';

import './index.scss';

export type { MlIconEnum };

export function MlIcon(props: MlIconProps) {
  return (
    <Text
      style={props.style}
      className={classNames(props.className, `ml-iconfont ml-icon-${callable(props.name)}`)}
    ></Text>
  );
}
