First sketch of ui types
This commit is contained in:
parent
82081e7c83
commit
b22e28dc44
8 changed files with 221 additions and 105 deletions
10
src/utils/parseIconName.js
Normal file
10
src/utils/parseIconName.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
// @flow
|
||||
import React from "react";
|
||||
|
||||
export default function parseIconName(name: string): string {
|
||||
return `mdi ${name.split(" ").map(icon => "mdi-".concat(icon)).join(" ")}`;
|
||||
}
|
||||
|
||||
export const renderIcon = (name: string, extraClass?: string) => {
|
||||
return <i className={`${extraClass || ""} ${parseIconName(name)}`}></i>;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue