mirror of
https://github.com/checktheroads/hyperglass
synced 2024-05-11 05:55:08 +00:00
add typings for eslint
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
import { Flex } from '@chakra-ui/react';
|
||||
import { useColorValue } from '~/context';
|
||||
|
||||
import type { ICardBody } from './types';
|
||||
import type { TCardBody } from './types';
|
||||
|
||||
export const CardBody = (props: ICardBody) => {
|
||||
export const CardBody: React.FC<TCardBody> = (props: TCardBody) => {
|
||||
const { onClick, ...rest } = props;
|
||||
const bg = useColorValue('white', 'dark.500');
|
||||
const color = useColorValue('dark.500', 'white');
|
||||
console.log('some shit');
|
||||
return (
|
||||
<Flex
|
||||
bg={bg}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Flex } from '@chakra-ui/react';
|
||||
|
||||
import type { ICardFooter } from './types';
|
||||
import type { TCardFooter } from './types';
|
||||
|
||||
export const CardFooter = (props: ICardFooter) => (
|
||||
export const CardFooter: React.FC<TCardFooter> = (props: TCardFooter) => (
|
||||
<Flex
|
||||
p={4}
|
||||
direction="column"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Flex, Text } from '@chakra-ui/react';
|
||||
import { useColorValue } from '~/context';
|
||||
|
||||
import type { ICardHeader } from './types';
|
||||
import type { TCardHeader } from './types';
|
||||
|
||||
export const CardHeader = (props: ICardHeader) => {
|
||||
export const CardHeader: React.FC<TCardHeader> = (props: TCardHeader) => {
|
||||
const { children, ...rest } = props;
|
||||
const bg = useColorValue('blackAlpha.50', 'whiteAlpha.100');
|
||||
return (
|
||||
@@ -14,7 +14,8 @@ export const CardHeader = (props: ICardHeader) => {
|
||||
roundedTopLeft={4}
|
||||
roundedTopRight={4}
|
||||
borderBottomWidth="1px"
|
||||
{...rest}>
|
||||
{...rest}
|
||||
>
|
||||
<Text fontWeight="bold">{children}</Text>
|
||||
</Flex>
|
||||
);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import type { FlexProps } from '@chakra-ui/react';
|
||||
|
||||
export interface ICardBody extends Omit<FlexProps, 'onClick'> {
|
||||
export interface TCardBody extends Omit<FlexProps, 'onClick'> {
|
||||
onClick?: () => boolean;
|
||||
}
|
||||
|
||||
export interface ICardFooter extends FlexProps {}
|
||||
export interface TCardFooter extends FlexProps {}
|
||||
|
||||
export interface ICardHeader extends FlexProps {}
|
||||
export interface TCardHeader extends FlexProps {}
|
||||
|
||||
Reference in New Issue
Block a user