-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'task/BubblesDS-5' into epic/MainLibrary-0
- Loading branch information
Showing
18 changed files
with
7,497 additions
and
7,179 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
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
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
28 changes: 28 additions & 0 deletions
28
packages/components/src/form/ActionButton/ActionButton.constants.js
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,28 @@ | ||
import PropTypes from 'prop-types'; | ||
|
||
export const ACTION_BUTTON_SIZES = ['sm', 'md']; | ||
// export const ACTION_BUTTON_COLORS = ['primary', 'negative', 'phatic']; | ||
export const ACTION_BUTTON_COLORS = ['primary']; | ||
|
||
export const ACTION_BUTTON_DEFAULT_PROPS = { | ||
color: ACTION_BUTTON_COLORS[0], | ||
size: ACTION_BUTTON_SIZES[1], | ||
label: '', | ||
rounded: false, | ||
useAria: true, | ||
active: false, | ||
}; | ||
export const ACTION_BUTTON_PROP_TYPES = { | ||
/** Controls the size */ | ||
size: PropTypes.oneOf(ACTION_BUTTON_SIZES), | ||
/** Control the color */ | ||
color: PropTypes.oneOf(ACTION_BUTTON_COLORS), | ||
/** Control the tooltip of the button */ | ||
tooltip: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]), | ||
/** Controls if ActionButton uses aria role */ | ||
useAria: PropTypes.bool, | ||
/** Aria label for ActionButton */ | ||
ariaLabel: PropTypes.string, | ||
/** Controls the visual state of the Button */ | ||
active: PropTypes.bool, | ||
}; |
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
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
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
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,52 @@ | ||
import PropTypes from 'prop-types'; | ||
|
||
export const BUTTON_SIZES = ['sm', 'md']; | ||
// export const BUTTON_VARIANTS = ['filled', 'outline', 'link', 'light']; | ||
export const BUTTON_VARIANTS = ['filled', 'outline', 'link']; | ||
// export const BUTTON_COLORS = ['primary', 'secondary', 'terciary', 'phatic']; | ||
export const BUTTON_COLORS = ['primary']; | ||
// export const BUTTON_TEXT_ALIGN = ['left', 'center', 'right', 'appart']; | ||
export const BUTTON_TEXT_ALIGN = ['center']; | ||
export const BUTTON_DEFAULT_PROPS = { | ||
color: BUTTON_COLORS[0], | ||
size: BUTTON_SIZES[1], | ||
variant: BUTTON_VARIANTS[0], | ||
rounded: false, | ||
loading: false, | ||
fullWidth: false, | ||
disabled: false, | ||
textAlign: BUTTON_TEXT_ALIGN[0], | ||
useAria: true, | ||
isSelected: false, | ||
}; | ||
|
||
export const BUTTON_PROP_TYPES = { | ||
/** Controls the button size. */ | ||
size: PropTypes.string, // PropTypes.oneOf(BUTTON_SIZES), | ||
/** Controls the button colors. */ | ||
color: PropTypes.oneOf(BUTTON_COLORS), | ||
/** Controls the button variants. */ | ||
variant: PropTypes.oneOf(BUTTON_VARIANTS), | ||
/** Controls the space and position between elements inside the button */ | ||
textAlign: PropTypes.oneOf(BUTTON_TEXT_ALIGN), | ||
/** Controls the border radius */ | ||
rounded: PropTypes.bool, | ||
/** Controls if is loading */ | ||
loading: PropTypes.bool, | ||
/** Adds icon before button label */ | ||
leftIcon: PropTypes.node, | ||
/** Adds icon after button label, */ | ||
rightIcon: PropTypes.node, | ||
/** Sets button width to 100% of parent element */ | ||
fullWidth: PropTypes.bool, | ||
/** Controls if the button is compact */ | ||
compact: PropTypes.bool, | ||
/** Controls the disabled state */ | ||
disabled: PropTypes.bool, | ||
/** Controls if Button uses aria role */ | ||
useAria: PropTypes.bool, | ||
/** Aria label for button */ | ||
ariaLabel: PropTypes.string, | ||
/** Controls if Button is selected */ | ||
isSelected: PropTypes.bool, | ||
}; |
Oops, something went wrong.