mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-16 01:29:09 +00:00
feat(design-system): use rpcs
This commit is contained in:
parent
f31b32c54a
commit
00dff464df
7 changed files with 14 additions and 10 deletions
|
@ -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",
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue