You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
306 B
React
15 lines
306 B
React
4 years ago
|
"use strict";
|
||
|
|
||
|
const React = require("react");
|
||
|
const defaultValue = require("default-value");
|
||
|
|
||
|
module.exports = function Command({ children, name }) {
|
||
|
let commandName = defaultValue(name, children.trim());
|
||
|
|
||
|
return (
|
||
|
<a className="command" href={`/commands/${commandName}`}>
|
||
|
{children}
|
||
|
</a>
|
||
|
);
|
||
|
};
|