-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(split-button): add ts type definitions
- Loading branch information
1 parent
2b4aacd
commit 0598f16
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from "./split-button"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import * as React from "react"; | ||
import * as OptionsHelper from "../../utils/helpers/options-helper/options-helper"; | ||
|
||
export interface SplitButtonProps { | ||
/** Set align of the rendered content */ | ||
align?: OptionsHelper.AlignBinaryType; | ||
/** Button type: "primary" | "secondary" for legacy theme */ | ||
as?: OptionsHelper.ThemesBinary; | ||
/** Button type: "primary" | "secondary" */ | ||
buttonType?: OptionsHelper.ThemesBinary; | ||
/** The additional button to display. */ | ||
children: React.ReactNode; | ||
/** A custom value for the data-element attribute */ | ||
"data-element"?: string; | ||
/** A custom value for the data-role attribute */ | ||
"data-role"?: string; | ||
/** Gives the button a disabled state. */ | ||
disabled?: boolean; | ||
/** Defines an Icon position within the button: "before" | "after" */ | ||
iconPosition?: "before" | "after"; | ||
/** The size of the buttons in the SplitButton. */ | ||
size?: OptionsHelper.SizesRestricted; | ||
/** The text to be displayed in the SplitButton. */ | ||
text: string; | ||
} | ||
|
||
declare class SplitButton extends React.Component<SplitButtonProps> {} | ||
|
||
export default SplitButton; |