afc163
1 year ago
20 changed files with 109 additions and 54 deletions
@ -0,0 +1,15 @@ |
|||
import type { AlertProps } from './Alert'; |
|||
import InternalAlert from './Alert'; |
|||
import ErrorBoundary from './ErrorBoundary'; |
|||
|
|||
export type { AlertProps } from './Alert'; |
|||
|
|||
type CompoundedComponent = React.FC<AlertProps> & { |
|||
ErrorBoundary: typeof ErrorBoundary; |
|||
}; |
|||
|
|||
const Alert = InternalAlert as CompoundedComponent; |
|||
|
|||
Alert.ErrorBoundary = ErrorBoundary; |
|||
|
|||
export default Alert; |
@ -0,0 +1,15 @@ |
|||
import React from 'react'; |
|||
import type { CheckboxOptionType } from './Group'; |
|||
|
|||
export interface CheckboxGroupContext { |
|||
name?: string; |
|||
toggleOption?: (option: CheckboxOptionType) => void; |
|||
value?: any; |
|||
disabled?: boolean; |
|||
registerValue: (val: string) => void; |
|||
cancelValue: (val: string) => void; |
|||
} |
|||
|
|||
const GroupContext = React.createContext<CheckboxGroupContext | null>(null); |
|||
|
|||
export default GroupContext; |
@ -0,0 +1,10 @@ |
|||
import React from 'react'; |
|||
|
|||
export interface DescriptionsContextProps { |
|||
labelStyle?: React.CSSProperties; |
|||
contentStyle?: React.CSSProperties; |
|||
} |
|||
|
|||
const DescriptionsContext = React.createContext<DescriptionsContextProps>({}); |
|||
|
|||
export default DescriptionsContext; |
Loading…
Reference in new issue