Skip to content

Commit 08be8a2

Browse files
committed
Forgot to commit typings
1 parent 33fb43f commit 08be8a2

File tree

4 files changed

+40
-1
lines changed

4 files changed

+40
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ node_modules/
4242
jspm_packages/
4343

4444
# Typescript v1 declaration files
45-
typings/
45+
!src/typings/
4646

4747
# Optional npm cache directory
4848
.npm
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { CommonProps } from './PCRCommonProps';
2+
3+
type Shape = 'curve' | 'round';
4+
type Fill = 'thick' | 'fill';
5+
type Animation = 'smooth' | 'jelly' | 'tada' | 'rotate' | 'pulse';
6+
7+
export type PCRCheckboxRadioProps<S = any> = Omit<CommonProps<S>, 'type'> & {
8+
shape?: Shape;
9+
variant?: Fill;
10+
animation?: Animation;
11+
plain?: boolean;
12+
icon?: React.ReactElement<any, 'svg' | 'i' | 'em' | 'img'>;
13+
iconType?: 'svg' | 'icon' | 'image';
14+
};

src/typings/PCRCommonProps.d.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import * as React from 'react';
2+
3+
type Colors = 'primary' | 'success' | 'info' | 'warning' | 'danger';
4+
type ColorsOutline = 'primary-o' | 'success-o' | 'info-o' | 'warning-o' | 'danger-o';
5+
6+
export type CommonProps<S> = React.InputHTMLAttributes<HTMLInputElement> & {
7+
locked?: boolean;
8+
color?: Colors | ColorsOutline;
9+
shape?: string;
10+
animation?: string;
11+
variant?: string;
12+
state?: S;
13+
bigger?: boolean;
14+
plain?: boolean;
15+
setState?: React.Dispatch<React.SetStateAction<S>>;
16+
};

src/typings/PCRSwitchProps.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { CommonProps } from './PCRCommonProps';
2+
3+
type Shape = 'fill' | 'slim';
4+
5+
export type PCRSwitchProps<S = any> = Omit<CommonProps<S>, 'variation' | 'animation'> & {
6+
shape?: Shape;
7+
animation?: undefined;
8+
iconType?: undefined;
9+
};

0 commit comments

Comments
 (0)