feat(design-system): use rpcs

This commit is contained in:
41666 2020-10-10 12:52:26 -04:00
parent f31b32c54a
commit 00dff464df
7 changed files with 14 additions and 10 deletions

View file

@ -11,7 +11,7 @@ react_library(
"styled-components",
"//src/design-system/atoms/colors",
"//src/design-system/atoms/timings",
"@roleypoly/rpc",
"//src/rpc/shared",
"@types/chroma-js",
"@types/react",
"@types/styled-components",

View file

@ -1,5 +1,5 @@
import * as React from 'react';
import { Role as RPCRole } from '@roleypoly/rpc/shared';
import { Role as RPCRole } from 'roleypoly/src/rpc/shared';
import * as styled from './Role.styled';
import { FaCheck, FaTimes } from 'react-icons/fa';
import { numberToChroma } from 'roleypoly/src/design-system/atoms/colors';

View file

@ -14,11 +14,11 @@ type TabProps = {
export const TabView = (props: TabViewProps) => {
const tabNames = React.Children.map(props.children, (child) => {
if (!React.isValidElement(child)) {
return null;
return '(Oops)';
}
return child.props.title;
});
}) as string[];
if (tabNames.length === 0) {
return null;